Update Authelia configuration to use environment variables for domains and secrets

This commit is contained in:
Mohmmed Elfateh Sabry
2025-08-11 13:53:11 +03:00
parent e77f5f4caa
commit e6f1084fa8
2 changed files with 11 additions and 7 deletions

View File

@@ -65,15 +65,15 @@ access_control:
- '172.16.0.0/12' - '172.16.0.0/12'
- '192.168.0.0/16' - '192.168.0.0/16'
rules: rules:
- domain: 'auth.gate.3launchpad.com' - domain: 'auth.gate.${DOMAIN}'
policy: 'bypass' policy: 'bypass'
- domain: - domain:
- 'traefik.gate.3launchpad.com' - 'traefik.gate.${DOMAIN}'
- 'portainer.gate.3launchpad.com' - 'portainer.gate.${DOMAIN}'
policy: 'two_factor' policy: 'two_factor'
subject: subject:
- 'group:admins' - 'group:admins'
- domain: '*.gate.3launchpad.com' - domain: '*.gate.${DOMAIN}'
policy: 'one_factor' policy: 'one_factor'
session: session:
@@ -83,9 +83,9 @@ session:
inactivity: 5m inactivity: 5m
remember_me: 1M remember_me: 1M
cookies: cookies:
- domain: 'gate.3launchpad.com' - domain: 'gate.${DOMAIN}'
authelia_url: 'https://auth.gate.3launchpad.com' authelia_url: 'https://auth.gate.${DOMAIN}'
default_redirection_url: 'https://gate.3launchpad.com' default_redirection_url: 'https://gate.${DOMAIN}'
regulation: regulation:
max_retries: 3 max_retries: 3

View File

@@ -118,6 +118,10 @@ services:
- ./authelia:/config - ./authelia:/config
environment: environment:
TZ: "${TZ}" TZ: "${TZ}"
AUTHELIA_JWT_SECRET: "${AUTHELIA_JWT_SECRET}"
AUTHELIA_SESSION_SECRET: "${AUTHELIA_SESSION_SECRET}"
AUTHELIA_STORAGE_ENCRYPTION_KEY: "${AUTHELIA_STORAGE_ENCRYPTION_KEY}"
DOMAIN: "${DOMAIN}"
labels: labels:
- traefik.enable=true - traefik.enable=true
- traefik.http.routers.authelia.rule=Host(`auth.gate.${DOMAIN}`) - traefik.http.routers.authelia.rule=Host(`auth.gate.${DOMAIN}`)