110 lines
2.9 KiB
YAML
110 lines
2.9 KiB
YAML
services:
|
|
postgresql:
|
|
image: docker.io/library/postgres:16-alpine
|
|
container_name: authentik_postgres
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
|
start_period: 20s
|
|
interval: 30s
|
|
retries: 5
|
|
timeout: 5s
|
|
volumes:
|
|
- /mnt/storage/apps/authentik/postgres:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_PASSWORD=${PG_PASS}
|
|
- POSTGRES_USER=authentik
|
|
- POSTGRES_DB=authentik
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 512M
|
|
cpus: '0.5'
|
|
|
|
redis:
|
|
image: docker.io/library/redis:alpine
|
|
container_name: authentik_redis
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
|
start_period: 20s
|
|
interval: 30s
|
|
retries: 5
|
|
timeout: 3s
|
|
volumes:
|
|
- /mnt/storage/apps/authentik/redis:/data
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
cpus: '0.25'
|
|
|
|
server:
|
|
image: ghcr.io/goauthentik/server:2025.2.4
|
|
container_name: authentik_server
|
|
restart: unless-stopped
|
|
command: server
|
|
environment:
|
|
- AUTHENTIK_REDIS__HOST=redis
|
|
- AUTHENTIK_POSTGRESQL__HOST=postgresql
|
|
- AUTHENTIK_POSTGRESQL__USER=authentik
|
|
- AUTHENTIK_POSTGRESQL__NAME=authentik
|
|
- AUTHENTIK_POSTGRESQL__PASSWORD=${PG_PASS}
|
|
- AUTHENTIK_SECRET_KEY=${AUTHENTIK_SECRET_KEY}
|
|
- AUTHENTIK_ERROR_REPORTING__ENABLED=false
|
|
volumes:
|
|
- /mnt/storage/apps/authentik/media:/media
|
|
- /mnt/storage/apps/authentik/custom-templates:/templates
|
|
depends_on:
|
|
postgresql:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "ak", "healthcheck"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 1G
|
|
cpus: '1.0'
|
|
networks:
|
|
- default
|
|
- network
|
|
|
|
worker:
|
|
image: ghcr.io/goauthentik/server:2025.2.4
|
|
container_name: authentik_worker
|
|
restart: unless-stopped
|
|
command: worker
|
|
environment:
|
|
- AUTHENTIK_REDIS__HOST=redis
|
|
- AUTHENTIK_POSTGRESQL__HOST=postgresql
|
|
- AUTHENTIK_POSTGRESQL__USER=authentik
|
|
- AUTHENTIK_POSTGRESQL__NAME=authentik
|
|
- AUTHENTIK_POSTGRESQL__PASSWORD=${PG_PASS}
|
|
- AUTHENTIK_SECRET_KEY=${AUTHENTIK_SECRET_KEY}
|
|
- AUTHENTIK_ERROR_REPORTING__ENABLED=false
|
|
volumes:
|
|
- /mnt/storage/apps/authentik/media:/media
|
|
- /mnt/storage/apps/authentik/certs:/certs
|
|
- /mnt/storage/apps/authentik/custom-templates:/templates
|
|
depends_on:
|
|
postgresql:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 1G
|
|
cpus: '1.0'
|
|
|
|
networks:
|
|
network:
|
|
name: proxy
|
|
external: true
|