fix: use Authelia environment variables instead of YAML substitution

- Set AUTHELIA_IDENTITY_VALIDATION_RESET_PASSWORD_JWT_SECRET in compose
- Set AUTHELIA_SESSION_SECRET in compose
- Set AUTHELIA_STORAGE_ENCRYPTION_KEY in compose
- Set AUTHELIA_STORAGE_POSTGRES_PASSWORD in compose
- Remove variable syntax from configuration.yml
- Authelia reads these directly from environment variables
This commit is contained in:
2025-11-15 20:09:12 +01:00
parent 9f6a119bf9
commit 5c9338dcf4
2 changed files with 7 additions and 7 deletions

View File

@@ -15,9 +15,8 @@ log:
level: info level: info
format: text format: text
identity_validation: # identity_validation jwt_secret set via environment variable:
reset_password: # AUTHELIA_IDENTITY_VALIDATION_RESET_PASSWORD_JWT_SECRET
jwt_secret: ${AUTHELIA_JWT_SECRET}
totp: totp:
issuer: pivoine.art issuer: pivoine.art
@@ -85,8 +84,8 @@ access_control:
- "coolify.pivoine.art" - "coolify.pivoine.art"
policy: two_factor policy: two_factor
# session secret set via environment variable: AUTHELIA_SESSION_SECRET
session: session:
secret: ${AUTHELIA_SESSION_SECRET}
cookies: cookies:
- name: authelia_session - name: authelia_session
domain: pivoine.art domain: pivoine.art
@@ -100,14 +99,14 @@ regulation:
find_time: 2m find_time: 2m
ban_time: 5m ban_time: 5m
# storage encryption_key and postgres password set via environment variables:
# AUTHELIA_STORAGE_ENCRYPTION_KEY, AUTHELIA_STORAGE_POSTGRES_PASSWORD
storage: storage:
encryption_key: ${AUTHELIA_STORAGE_ENCRYPTION_KEY}
postgres: postgres:
host: postgres host: postgres
port: 5432 port: 5432
database: authelia database: authelia
username: valknar username: valknar
password: ${DB_PASSWORD}
schema: public schema: public
notifier: notifier:

View File

@@ -272,9 +272,10 @@ services:
restart: unless-stopped restart: unless-stopped
environment: environment:
TZ: ${TIMEZONE:-Europe/Berlin} TZ: ${TIMEZONE:-Europe/Berlin}
AUTHELIA_JWT_SECRET: ${AUTHELIA_JWT_SECRET} AUTHELIA_IDENTITY_VALIDATION_RESET_PASSWORD_JWT_SECRET: ${AUTHELIA_JWT_SECRET}
AUTHELIA_SESSION_SECRET: ${AUTHELIA_SESSION_SECRET} AUTHELIA_SESSION_SECRET: ${AUTHELIA_SESSION_SECRET}
AUTHELIA_STORAGE_ENCRYPTION_KEY: ${AUTHELIA_STORAGE_ENCRYPTION_KEY} AUTHELIA_STORAGE_ENCRYPTION_KEY: ${AUTHELIA_STORAGE_ENCRYPTION_KEY}
AUTHELIA_STORAGE_POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes: volumes:
- authelia_config:/config - authelia_config:/config
- ./authelia:/etc/authelia:ro - ./authelia:/etc/authelia:ro