bunkerweb/examples/authelia/docker-compose.autoconf.yml
2021-08-12 10:19:43 +02:00

71 lines
1.8 KiB
YAML

version: '3.3'
services:
authelia:
image: authelia/authelia
networks:
services-net:
aliases:
- authelia
volumes:
- ./authelia:/config
healthcheck:
disable: true
environment:
- TZ=France/Paris
labels:
- "bunkerized-nginx.SERVER_NAME=auth.example.com"
- "bunkerized-nginx.USE_REVERSE_PROXY=yes"
- "bunkerized-nginx.REVERSE_PROXY_URL=/"
- "bunkerized-nginx.REVERSE_PROXY_HOST=http://authelia:9091"
redis:
image: redis:alpine
networks:
services-net:
aliases:
- redis
volumes:
- ./redis:/data
environment:
- TZ=France/Paris
myapp1:
image: php:fpm
networks:
services-net:
aliases:
- myapp1
volumes:
- ./web-files/app1.example.com:/app
labels:
- "bunkerized-nginx.SERVER_NAME=app1.example.com"
- "bunkerized-nginx.USE_AUTHELIA=yes"
- "bunkerized-nginx.AUTHELIA_BACKEND=https://auth.example.com"
- "bunkerized-nginx.AUTHELIA_UPSTREAM=http://authelia:9091"
- "bunkerized-nginx.REMOTE_PHP=myapp1"
- "bunkerized-nginx.REMOTE_PHP_PATH=/app"
myapp2:
image: php:apache
networks:
services-net:
aliases:
- myapp2
volumes:
- ./web-files/app2.example.com:/var/www/html
labels:
- "bunkerized-nginx.SERVER_NAME=app2.example.com"
- "bunkerized-nginx.USE_AUTHELIA=yes"
- "bunkerized-nginx.AUTHELIA_BACKEND=https://auth.example.com"
- "bunkerized-nginx.AUTHELIA_UPSTREAM=http://authelia:9091"
- "bunkerized-nginx.USE_REVERSE_PROXY=yes"
- "bunkerized-nginx.REVERSE_PROXY_URL=/"
- "bunkerized-nginx.REVERSE_PROXY_HOST=http://myapp2"
networks:
services-net:
external:
name: services-net