Files
homelabstack/stacks/authentik/docker-compose.yml
T
ginnoir 7aa95fa00a refactor: pure env_file stack.env convention across all stacks
Every service now reads stack.env via env_file with container-exact var
names — no ${VAR} parse-time interpolation, no Portainer UI env vars
(except stacks/dev, kept on UI-env interpolation as documented exception).

- media: drop PUID/PGID/TZ env lines (env_file covers); resolve ${ROOT}
- foundry: secrets via env_file; FOUNDRY_PATCH_URLS -> CONTAINER_PATCH_URLS
- monitoring: HOMARR_SECRET_ENCRYPTION_KEY -> SECRET_ENCRYPTION_KEY
- notify: FRESHRSS_USER composed in stack.env; TZ via env_file
- owncloud: container-exact OWNCLOUD_*/MYSQL_* keys; runtime $$ healthcheck
- resume/famapp: composites (DATABASE_URL etc.) written out in stack.env
- authentik: container-exact keys; image tag pinned in compose
- notes: couchdb creds via env_file
- remote: gains stack.env (no secrets; convention completeness)
- CLAUDE.md: env convention, valhalla-lab registration-only note, correct
  on-host Portainer working-copy path (/config/portainer/compose/<id>)

Validated with docker compose config on valhalla for all 15 stacks.
2026-06-09 16:03:47 -05:00

83 lines
2.1 KiB
YAML

# authentik stack — Authentik server + worker + dedicated Postgres and Redis.
#
# Volume -> bind-mount conversions (both low density -> SSD):
# db data -> /config/authentik/postgres
# redis data -> /config/authentik/redis
# Only the server joins edge (auth.ginnoir.com); worker/db/redis stay private.
services:
authentik-server:
container_name: authentik_server
image: ghcr.io/goauthentik/server:2024.12.3
restart: unless-stopped
command: server
networks: [authentik, edge]
env_file:
- stack.env
environment:
AUTHENTIK_REDIS__HOST: authentik-redis
AUTHENTIK_POSTGRESQL__HOST: authentik-db
AUTHENTIK_ERROR_REPORTING__ENABLED: "false"
ports:
- "9200:9000"
depends_on:
authentik-db:
condition: service_healthy
authentik-redis:
condition: service_healthy
authentik-worker:
container_name: authentik_worker
image: ghcr.io/goauthentik/server:2024.12.3
restart: unless-stopped
command: worker
networks: [authentik]
env_file:
- stack.env
environment:
AUTHENTIK_REDIS__HOST: authentik-redis
AUTHENTIK_POSTGRESQL__HOST: authentik-db
AUTHENTIK_ERROR_REPORTING__ENABLED: "false"
depends_on:
authentik-db:
condition: service_healthy
authentik-redis:
condition: service_healthy
authentik-db:
container_name: postgres_authentik
image: postgres:16-alpine
restart: unless-stopped
networks: [authentik]
env_file:
- stack.env
volumes:
- /config/authentik/postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U authentik -d authentik"]
interval: 10s
timeout: 5s
retries: 5
authentik-redis:
container_name: redis_authentik
image: redis:7-alpine
restart: unless-stopped
networks: [authentik]
command: --save 60 1 --loglevel warning
volumes:
- /config/authentik/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
authentik:
name: authentik
driver: bridge
edge:
name: edge
external: true