Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: mount custom css file #28

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ayushin
Copy link

@ayushin ayushin commented Oct 23, 2024

This allows for authentik customisation by mounting custom.css file

@ayushin
Copy link
Author

ayushin commented Oct 23, 2024

Solves #17

Comment on lines +1 to +7
{
"active_provider": "claude.ai",
"active_organization_id": "4c1644e0-e630-48f7-bb87-4d8387ef9cd8",
"active_project_id": "641c515a-68dc-4705-a9bd-c3f3a151b110",
"active_project_name": "ansible-role-authentik",
"local_path": "/Users/alexis/Work/apexive/ansible-role-authentik"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this

Comment on lines +50 to +51
with_items:
- {src: "{{ role_path }}/templates/custom.css.j2", dest: "{{ authentik_custom_css_path }}/custom.css"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use with_items when you're only dealing with 1 item. You can adjust src and dest above.

@@ -27,7 +27,8 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--health-interval={{ authentik_container_health_interval }} \
--mount type=bind,src={{ authentik_certs_path }},dst=/certs \
--mount type=bind,src={{ authentik_media_path }},dst=/media \
--mount type=bind,src={{ authentik_custon_templates_path }},dst=/templates \
--mount type=bind,src={{ authentik_custom_templates_path }},dst=/templates \
--mount type=bind,src={{ authentik_custom_css_path }}/custom.css,dst=/web/dist/custom.css \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Custom CSS documentation doesn't say we can, but I imagine we might be able to mount this as read-only.

Suggested change
--mount type=bind,src={{ authentik_custom_css_path }}/custom.css,dst=/web/dist/custom.css \
--mount type=bind,src={{ authentik_custom_css_path }}/custom.css,dst=/web/dist/custom.css,ro \

If you can confirm it works, let's do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants