Files
docker-stacks/stacks/authentik/docker-compose.yml
knight 2609411fd8
Some checks failed
Deploy Stacks / deploy-prod (push) Failing after 3s
Deploy Stacks / deploy-dev (push) Has been cancelled
Fix authentik postgres version to match data
Pin postgres to 12-alpine to match existing data directory
that was initialized with PostgreSQL 12.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 10:19:40 -05:00

79 lines
2.1 KiB
YAML

services:
server:
image: ghcr.io/goauthentik/server:latest
container_name: authentik-server
restart: unless-stopped
ports:
- "9000:9000"
command: server
environment:
AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY}
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: authentik
AUTHENTIK_POSTGRESQL__NAME: authentik
AUTHENTIK_POSTGRESQL__PASSWORD: ${AUTHENTIK_PG_PASS}
volumes:
- ./media:/media
- ./custom-templates:/templates
env_file:
- .env
depends_on:
- postgresql
- redis
networks:
- web
- default
labels:
- "com.ghost.tel/stack-type=prod"
- "traefik.enable=true"
- "traefik.http.routers.authentik.entrypoints=https"
- "traefik.http.routers.authentik.rule=Host(`authentik.${DOMAIN}`)"
- "traefik.http.routers.authentik.tls.certresolver=http"
- "traefik.http.services.authentik.loadbalancer.server.port=9000"
worker:
image: ghcr.io/goauthentik/server:latest
container_name: authentik-worker
restart: unless-stopped
command: worker
environment:
AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY}
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: authentik
AUTHENTIK_POSTGRESQL__NAME: authentik
AUTHENTIK_POSTGRESQL__PASSWORD: ${AUTHENTIK_PG_PASS}
volumes:
- ./media:/media
- ./certs:/certs
- ./custom-templates:/templates
env_file:
- .env
depends_on:
- postgresql
- redis
postgresql:
image: postgres:12-alpine
container_name: authentik-postgres
restart: unless-stopped
environment:
POSTGRES_PASSWORD: ${AUTHENTIK_PG_PASS}
POSTGRES_USER: authentik
POSTGRES_DB: authentik
volumes:
- ./postgres:/var/lib/postgresql/data
redis:
image: redis:alpine
container_name: authentik-redis
restart: unless-stopped
command: --save 60 1 --loglevel warning
volumes:
- ./redis:/data
networks:
web:
external: true