version: "3.4" # Authentik — Identity Provider / SSO # Host: siklos (192.168.88.27) # Web UI: https://auth.jgitta.com (Caddy → port 9011) # Data: /srv/docker/authentik/ 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: - /srv/docker/authentik/postgres:/var/lib/postgresql/data environment: POSTGRES_PASSWORD: ${PG_PASS} POSTGRES_USER: ${PG_USER:-authentik} POSTGRES_DB: ${PG_DB:-authentik} redis: image: docker.io/library/redis:alpine container_name: authentik-redis command: --save 60 1 --loglevel warning restart: unless-stopped healthcheck: test: ["CMD-SHELL", "redis-cli ping | grep PONG"] start_period: 20s interval: 30s retries: 5 timeout: 3s volumes: - /srv/docker/authentik/redis:/data server: image: ghcr.io/goauthentik/server:latest container_name: authentik-server restart: unless-stopped command: server environment: AUTHENTIK_REDIS__HOST: redis AUTHENTIK_POSTGRESQL__HOST: postgresql AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik} AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik} AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS} AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY} AUTHENTIK_ERROR_REPORTING__ENABLED: "false" # Set this to your external URL — Authentik uses it for redirects AUTHENTIK_AUTHENTIK__DEFAULT_TOKEN_DURATION: "days=30" volumes: - /srv/docker/authentik/media:/media - /srv/docker/authentik/custom-templates:/templates ports: # Host port 9011 avoids conflict with Portainer's 9000 - "9011:9000" depends_on: postgresql: condition: service_healthy redis: condition: service_healthy worker: image: ghcr.io/goauthentik/server:latest container_name: authentik-worker restart: unless-stopped command: worker environment: AUTHENTIK_REDIS__HOST: redis AUTHENTIK_POSTGRESQL__HOST: postgresql AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik} AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik} AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS} AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY} AUTHENTIK_ERROR_REPORTING__ENABLED: "false" # Worker needs root to manage Docker socket for outpost deployments user: root volumes: - /var/run/docker.sock:/var/run/docker.sock - /srv/docker/authentik/media:/media - /srv/docker/authentik/certs:/certs - /srv/docker/authentik/custom-templates:/templates depends_on: postgresql: condition: service_healthy redis: condition: service_healthy