From 5f7a6f4a6c467a66d4d808e0e7826502370b662c Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Tue, 10 Jan 2023 15:23:31 +0100 Subject: [PATCH] Load config into authelia --- authentication.docker-compose.yml | 18 +++++++++++++++++- docker/configs/traefik/dynamic/authelia.yml | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/authentication.docker-compose.yml b/authentication.docker-compose.yml index 5052dd1..46d4ffa 100644 --- a/authentication.docker-compose.yml +++ b/authentication.docker-compose.yml @@ -6,11 +6,19 @@ services: environment: NASCOMPOSE_TRAEFIK_DOMAINS: ${NASCOMPOSE_TRAEFIK_DOMAINS?} 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: - traefik volumes: - 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: - jwt_secret labels: @@ -23,6 +31,14 @@ networks: volumes: 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: jwt_secret: file: ${NASCOMPOSE_SERVICES?}/secrets/authelia/jwt_secret diff --git a/docker/configs/traefik/dynamic/authelia.yml b/docker/configs/traefik/dynamic/authelia.yml index 8381c03..e8386f8 100644 --- a/docker/configs/traefik/dynamic/authelia.yml +++ b/docker/configs/traefik/dynamic/authelia.yml @@ -2,7 +2,7 @@ http: middlewares: authelia: 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 authResponseHeaders: - Remote-User