38 lines
1.7 KiB
YAML
38 lines
1.7 KiB
YAML
---
|
|
version: '3'
|
|
services:
|
|
authelia-backend:
|
|
build:
|
|
context: example/compose/authelia
|
|
dockerfile: Dockerfile.backend
|
|
args:
|
|
USER_ID: ${USER_ID}
|
|
GROUP_ID: ${GROUP_ID}
|
|
security_opt:
|
|
- seccomp:unconfined
|
|
- apparmor:unconfined
|
|
command: /resources/entrypoint-backend.sh
|
|
working_dir: /app
|
|
cap_add:
|
|
- SYS_PTRACE
|
|
volumes:
|
|
- './example/compose/authelia/resources/:/resources'
|
|
- '../..:/app'
|
|
- '${GOPATH}:/go'
|
|
labels:
|
|
# Traefik 1.x
|
|
- 'traefik.frontend.rule=Host:login.example.com;PathPrefix:/api,/devworkflow,/locales'
|
|
- 'traefik.protocol=https'
|
|
# Traefik 2.x
|
|
- 'traefik.enable=true'
|
|
- 'traefik.http.routers.authelia_backend.rule=Host(`login.example.com`) && PathPrefix(`/.well-known`) || Host(`login.example.com`) && PathPrefix(`${PathPrefix}/.well-known`) || Host(`login.example.com`) && PathPrefix(`/api`) || Host(`login.example.com`) && PathPrefix(`${PathPrefix}/api`) || Host(`login.example.com`) && PathPrefix(`/devworkflow`) || Host(`login.example.com`) && PathPrefix(`${PathPrefix}/devworkflow`) || Host(`login.example.com`) && PathPrefix(`/locales`) || Host(`login.example.com`) && PathPrefix(`${PathPrefix}/locales`) || Host(`login.example.com`) && Path(`/jwks.json`) || Host(`login.example.com`) && Path(`${PathPrefix}/jwks.json`)' # yamllint disable-line rule:line-length
|
|
- 'traefik.http.routers.authelia_backend.entrypoints=https'
|
|
- 'traefik.http.routers.authelia_backend.tls=true'
|
|
- 'traefik.http.services.authelia_backend.loadbalancer.server.scheme=https'
|
|
environment:
|
|
- ENVIRONMENT=dev
|
|
networks:
|
|
authelianet:
|
|
ipv4_address: 192.168.240.50
|
|
...
|