1
0
Files
docker-compose/emerald-theory/authentik/authentik.yml
2025-07-19 08:52:43 -04:00

132 lines
3.0 KiB
YAML

---
# Authentik
# 2FA for web apps
# Created by Authentik Security, LLC
# ↳ https://github.com/goauthentik/authentik
services:
authentik-postgresql:
image: docker.io/library/postgres:12-alpine
container_name: authentik-postgresql
restart: unless-stopped
networks:
- proxy
healthcheck:
test:
- CMD-SHELL
- pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
volumes:
- /home/fxequals/docker/authentik/database:/var/lib/postgresql/data
environment:
PUID: 1000
PGID: 1000
POSTGRES_PASSWORD: ${PG_PASS:?database password required}
POSTGRES_USER: ${PG_USER:-authentik}
POSTGRES_DB: ${PG_DB:-authentik}
env_file:
- .env
authentik-redis:
image: docker.io/library/redis:alpine
container_name: authentik-redis
command: --save 60 1 --loglevel warning
restart: unless-stopped
networks:
- proxy
healthcheck:
test:
- CMD-SHELL
- redis-cli ping | grep PONG
start_period: 20s
interval: 30s
retries: 5
timeout: 3s
volumes:
- /home/fxequals/docker/authentik/redis:/data
environment:
PUID: 1000
PGID: 1000
authentik-server:
image: ghcr.io/goauthentik/server:latest
command: server
container_name: authentik-server
restart: unless-stopped
networks:
proxy:
ipv4_address: 172.18.1.10
ports:
- 9000:9000 # Remove after putting Authentik behind NGINX
- 9443:9443 # Remove after putting Authentik behind NGINX
environment:
PUID: 1000
PGID: 1000
AUTHENTIK_REDIS__HOST: authentik-redis
AUTHENTIK_POSTGRESQL__HOST: authentik-postgresql
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
volumes:
- /home/fxequals/docker/authentik/media:/media
- /home/fxequals/docker/authentik/custom-templates:/templates
env_file:
- .env
depends_on:
- authentik-postgresql
- authentik-redis
authentik-worker:
image: ghcr.io/goauthentik/server:latest
restart: unless-stopped
container_name: authentik-worker
command: worker
networks:
- proxy
environment:
PUID: 1000
PGID: 1000
AUTHENTIK_REDIS__HOST: authentik-redis
AUTHENTIK_POSTGRESQL__HOST: authentik-postgresql
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
volumes:
- /home/fxequals/docker/authentik/media:/media
- /home/fxequals/docker/authentik/certs:/certs
- /home/fxequals/docker/authentik/custom-templates:/templates
env_file:
- .env
depends_on:
- authentik-postgresql
- authentik-redis
networks:
proxy:
external: true
# Documentation available at https://docs.goauthentik.io/docs/install-config/install/docker-compose