Files
docker-compose/EdgeWeb/edgeweb-authentik.yaml
2025-08-20 14:08:02 -04:00

114 lines
3.9 KiB
YAML

services:
postgresql:
image: docker.io/library/postgres:16-alpine
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -d authentik -U authentik"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
networks:
- authentik-net
volumes:
- /docker/authentik/db:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: authentik
POSTGRES_USER: authentik
POSTGRES_DB: authentik
redis:
image: docker.io/library/redis:alpine
command: --save 60 1 --loglevel warning
restart: unless-stopped
networks:
- authentik-net
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
start_period: 20s
interval: 30s
retries: 5
timeout: 3s
volumes:
- /docker/authentik/redis:/data
server:
image: ghcr.io/goauthentik/server:2025.6.4
restart: unless-stopped
command: server
environment:
AUTHENTIK_SECRET_KEY: F2rRTxbvERKsX2vma8Vq8ABjfierwj4VnvYwiFQ8h64ZPQ3Kx4Ks97mLnE94kyyWBWE4mnByvp9Z
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: authentik
AUTHENTIK_POSTGRESQL__NAME: authentik
AUTHENTIK_POSTGRESQL__PASSWORD: authentik
AUTHENTIK_EMAIL_HOST: smtp.gmail.com
AUTHENTIK_EMAIL_PORT: 587
AUTHENTIK_EMAIL_USERNAME: jake@kaspers.us
AUTHENTIK_EMAIL_PASSWORD: oqozrafdhnjcihsc
AUTHENTIK_EMAIL_USE_TLS: true
AUTHENTIK_EMAIL_FROM: authentik@kaspers.us
AUTHENTIK_LOG_LEVEL: debug
AUTHENTIK_HOST: https://auth.kaspers.us
volumes:
- /docker/authentik/media:/media
- /docker/authentik/templates:/templates
- /docker/authentik/blueprints/:/blueprints/
ports:
- 9001:9000
- 9444:9443
depends_on:
postgresql:
condition: service_healthy
redis:
condition: service_healthy
networks:
- authentik-net
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.authentik.rule=Host(`auth.kaspers.us`)" # ⚠️ UPDATE to your domain
- "traefik.http.routers.authentik.entrypoints=websecure" # Assumes your HTTP entrypoint is 'web'
- "traefik.http.services.authentik.loadbalancer.server.port=9000"
- "traefik.http.routers.external.tls=true"
- "traefik.docker.network=proxy"
- "traefik.constraint=proxy-public"
- "traefik.http.middlewares.authentik-headers.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.authentik.middlewares=authentik-headers@docker"
worker:
image: ghcr.io/goauthentik/server:2025.6.4
restart: unless-stopped
command: worker
networks:
- authentik-net
environment:
AUTHENTIK_SECRET_KEY: F2rRTxbvERKsX2vma8Vq8ABjfierwj4VnvYwiFQ8h64ZPQ3Kx4Ks97mLnE94kyyWBWE4mnByvp9Z
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
AUTHENTIK_POSTGRESQL__PASSWORD: authentik
AUTHENTIK_LOG_LEVEL: debug
# `user: root` and the docker socket volume are optional.
# See more for the docker socket integration here:
# https://goauthentik.io/docs/outposts/integrations/docker
# Removing `user: root` also prevents the worker from fixing the permissions
# on the mounted folders, so when removing this make sure the folders have the correct UID/GID
# (1000:1000 by default)
user: root
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /docker/authentik/certs:/certs
- /docker/authentik/media:/media
- /docker/authentik/templates:/templates
- /docker/authentik/blueprints/:/blueprints/
depends_on:
postgresql:
condition: service_healthy
redis:
condition: service_healthy
networks:
authentik-net:
driver: bridge
proxy:
external: true