Files
nas-compose/authentication.docker-compose.yml
2023-01-05 18:36:50 +01:00

78 lines
1.7 KiB
YAML

name: authentication
services:
postgresql:
image: postgres:12-alpine
environment:
- POSTGRES_PASSWORD=authentik
- POSTGRES_USER=authentik
- POSTGRES_DB=authentik
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
volumes:
- database:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:alpine
command: --save 60 1 --loglevel warning
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
start_period: 20s
interval: 30s
retries: 5
timeout: 3s
volumes:
- redis:/data
restart: unless-stopped
server:
image: ghcr.io/goauthentik/server:2022.12.2
command: server
environment:
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: authentik
AUTHENTIK_POSTGRESQL__NAME: authentik
AUTHENTIK_POSTGRESQL__PASSWORD: authentik
networks:
- default
- traefik
- macvlan
restart: unless-stopped
volumes:
- media:/media
- custom-templates:/templates
worker:
image: ghcr.io/goauthentik/server:2022.12.2
command: worker
environment:
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: authentik
AUTHENTIK_POSTGRESQL__NAME: authentik
AUTHENTIK_POSTGRESQL__PASSWORD: authentik
volumes:
- media:/media
- certs:/certs
- custom-templates:/templates
restart: unless-stopped
volumes:
database:
redis:
media:
certs:
custom-templates:
networks:
macvlan:
external: true
traefik:
external: true