bunkerized-nginx/examples/authelia/autoconf.yml

82 lines
2.8 KiB
YAML

version: "3"
services:
# APPLICATIONS
app1:
image: tutum/hello-world
networks:
bw-services:
aliases:
- app1
labels:
- bunkerweb.SERVER_NAME=app1.example.com
- bunkerweb.USE_REVERSE_PROXY=yes
- bunkerweb.REVERSE_PROXY_URL=/
- bunkerweb.REVERSE_PROXY_HOST=http://app1
- bunkerweb.REVERSE_PROXY_AUTH_REQUEST=/authelia
- bunkerweb.REVERSE_PROXY_AUTH_REQUEST_SIGNIN_URL=https://auth.example.com/?rd=$$scheme%3A%2F%2F$$host$$request_uri
- bunkerweb.REVERSE_PROXY_AUTH_REQUEST_SET=$$user $$upstream_http_remote_user;$$groups $$upstream_http_remote_groups;$$name $$upstream_http_remote_name;$$email $$upstream_http_remote_email
- bunkerweb.REVERSE_PROXY_HEADERS=Remote-User $$user;Remote-Groups $$groups;Remote-Name $$name;Remote-Email $$email
- bunkerweb.REVERSE_PROXY_URL_999=/authelia
- bunkerweb.REVERSE_PROXY_HOST_999=http://authelia:9091/api/verify
- bunkerweb.REVERSE_PROXY_HEADERS_999=X-Original-URL $$scheme://$$http_host$$request_uri;Content-Length ""
app2:
image: tutum/hello-world
networks:
bw-services:
aliases:
- app2
labels:
- bunkerweb.SERVER_NAME=app2.example.com
- bunkerweb.USE_REVERSE_PROXY=yes
- bunkerweb.REVERSE_PROXY_URL=/
- bunkerweb.REVERSE_PROXY_HOST=http://app2
- bunkerweb.REVERSE_PROXY_AUTH_REQUEST=/authelia
- bunkerweb.REVERSE_PROXY_AUTH_REQUEST_SIGNIN_URL=https://auth.example.com/?rd=$$scheme%3A%2F%2F$$host$$request_uri
- bunkerweb.REVERSE_PROXY_AUTH_REQUEST_SET=$$user $$upstream_http_remote_user;$$groups $$upstream_http_remote_groups;$$name $$upstream_http_remote_name;$$email $$upstream_http_remote_email
- bunkerweb.REVERSE_PROXY_HEADERS=Remote-User $$user;Remote-Groups $$groups;Remote-Name $$name;Remote-Email $$email
- bunkerweb.REVERSE_PROXY_URL_999=/authelia
- bunkerweb.REVERSE_PROXY_HOST_999=http://authelia:9091/api/verify
- bunkerweb.REVERSE_PROXY_HEADERS_999=X-Original-URL $$scheme://$$http_host$$request_uri;Content-Length ""
# AUTHELIA
authelia:
image: authelia/authelia:4
networks:
bw-services:
aliases:
- authelia
volumes:
- ./authelia:/config
restart: unless-stopped
healthcheck:
disable: true
environment:
- TZ=Europe/Paris
labels:
- bunkerweb.SERVER_NAME=auth.example.com
- bunkerweb.USE_REVERSE_PROXY=yes
- bunkerweb.REVERSE_PROXY_URL=/
- bunkerweb.REVERSE_PROXY_HOST=http://authelia:9091
- bunkerweb.REVERSE_PROXY_INTERCEPT_ERRORS=no
redis:
image: redis:7-alpine
networks:
bw-services:
aliases:
- redis
volumes:
- ./redis:/data
expose:
- 6379
restart: unless-stopped
environment:
- TZ=Europe/Paris
networks:
bw-services:
external: true
name: bw-services