Refactor Authelia configuration: switch to directory bind mount for configuration files to prevent timeouts and add .gitignore for runtime files

This commit is contained in:
Mohmmed Elfateh Sabry
2025-08-11 03:16:32 +03:00
parent 7c1931da3e
commit 8214e92c17
2 changed files with 9 additions and 3 deletions

4
authelia/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Ignore Authelia runtime/state files
# SQLite database and notification artifacts stored after switching to directory bind mount
/db.sqlite3
/notification.txt

View File

@@ -162,9 +162,11 @@ services:
environment: environment:
TZ: "${TZ}" TZ: "${TZ}"
volumes: volumes:
- ./authelia/configuration.yml:/config/configuration.yml:ro # Mount entire config directory so individual file binds are not hidden by a named volume.
- ./authelia/users_database.yml:/config/users_database.yml:ro # NOTE: The previous setup mounted a named volume at /config which masked the two file binds
- authelia_data:/config # causing Traefik -> Authelia timeouts (missing configuration). Persisted runtime files (db, notifications)
# will live in this folder on the host; ensure db.sqlite3 is gitignored.
- ./authelia:/config
networks: [traefik_proxy, internal] networks: [traefik_proxy, internal]
labels: labels:
- traefik.enable=true - traefik.enable=true