Files
homelabstack/stacks/authentik/docker-compose.yml
T
ginnoirandClaude Sonnet 5 13e29d9040 fix(logs): cap json-file log size on authentik/immich/mariadb
These three containers were writing multi-GB/day of unbounded logs
(authentik_server 3.5GB, immich-server 2.3GB, owncloud_mariadb 2.1GB),
a major contributor to a recent 100% disk-full incident. Daemon-wide
default (max-size 10m, max-file 3) was also added to
/etc/docker/daemon.json on valhalla, but that only covers newly
created containers going forward -- these three need the explicit
per-service override since they're long-running and won't be
recreated otherwise.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-01 02:11:38 -05:00

95 lines
2.5 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:2026.5.2
restart: unless-stopped
command: server
networks: [authentik, edge]
env_file:
- stack.env
environment:
AUTHENTIK_HOST: https://auth.ginnoir.com
AUTHENTIK_REDIS__HOST: authentik-redis
AUTHENTIK_POSTGRESQL__HOST: authentik-db
AUTHENTIK_ERROR_REPORTING__ENABLED: "false"
volumes:
- ./blueprints:/blueprints/custom:ro
ports:
- "9200:9000"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
depends_on:
authentik-db:
condition: service_healthy
authentik-redis:
condition: service_healthy
authentik-worker:
container_name: authentik_worker
image: ghcr.io/goauthentik/server:2026.5.2
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
labels:
- "com.centurylabs.watchtower.enable=false"
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
labels:
- "com.centurylabs.watchtower.enable=false"
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