Load config into authelia

This commit is contained in:
Colin Hebert
2023-01-10 15:23:31 +01:00
parent 4f387906c5
commit 5f7a6f4a6c
2 changed files with 18 additions and 2 deletions

View File

@@ -6,11 +6,19 @@ services:
environment: environment:
NASCOMPOSE_TRAEFIK_DOMAINS: ${NASCOMPOSE_TRAEFIK_DOMAINS?} NASCOMPOSE_TRAEFIK_DOMAINS: ${NASCOMPOSE_TRAEFIK_DOMAINS?}
AUTHELIA_DEFAULT_REDIRECTION_URL: "" #Heimdall AUTHELIA_DEFAULT_REDIRECTION_URL: "" #Heimdall
AUTHELIA_JWT_SECRET_FILE: /run/secret/jwt_secret AUTHELIA_JWT_SECRET_FILE: /run/secrets/jwt_secret
X_AUTHELIA_CONFIG: /etc/authelia/
networks: networks:
- traefik - traefik
volumes: volumes:
- config:/config - config:/config
configs:
- source: authelia_configuration
target: /etc/authelia/configuration.yml
- source: authelia_access
target: /etc/authelia/access.yml
- source: authelia_authentication
target: /etc/authelia/authentication.yml
secrets: secrets:
- jwt_secret - jwt_secret
labels: labels:
@@ -23,6 +31,14 @@ networks:
volumes: volumes:
config: config:
configs:
authelia_configuration:
file: ${NASCOMPOSE_SERVICES?}/configs/authelia/configuration.yml
authelia_access:
file: ${NASCOMPOSE_SERVICES?}/configs/authelia/access.yml
authelia_authentication:
file: ${NASCOMPOSE_SERVICES?}/configs/authelia/authentication.yml
secrets: secrets:
jwt_secret: jwt_secret:
file: ${NASCOMPOSE_SERVICES?}/secrets/authelia/jwt_secret file: ${NASCOMPOSE_SERVICES?}/secrets/authelia/jwt_secret

View File

@@ -2,7 +2,7 @@ http:
middlewares: middlewares:
authelia: authelia:
forwardAuth: forwardAuth:
address: 'http://authelia:9091/api/verify?rd=https%3A%2F%2Fauthelia.{{ ( env "NASCOMPOSE_TRAEFIK_DOMAINS" | split "," )._0 }}%2F' address: 'http://authelia:9091/api/verify?rd=https%3A%2F%2Fauthelia.{{ env `NASCOMPOSE_TRAEFIK_DOMAINS` | split `,` | first }}%2F'
trustForwardHeader: true trustForwardHeader: true
authResponseHeaders: authResponseHeaders:
- Remote-User - Remote-User