98 lines
3.2 KiB
Django/Jinja
98 lines
3.2 KiB
Django/Jinja
---
|
|
version: '3.4'
|
|
|
|
services:
|
|
postgresql-authentik:
|
|
image: docker.io/library/postgres:12-alpine
|
|
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:
|
|
- {{ authentik_volume_db }}:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_PASSWORD={{ authentik_db_password }}
|
|
- POSTGRES_USER={{ authentik_db_user }}
|
|
- POSTGRES_DB={{ authentik_db }}
|
|
env_file:
|
|
- {{ authentik_volume_config }}/env.authentik.conf
|
|
networks:
|
|
- authentik
|
|
redis-authentik:
|
|
image: docker.io/library/redis:alpine
|
|
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:
|
|
- {{ authentik_volume_redis }}:/data
|
|
networks:
|
|
- authentik
|
|
server:
|
|
image: ghcr.io/goauthentik/server:{{ authentik_image_version }}
|
|
restart: unless-stopped
|
|
command: server
|
|
environment:
|
|
AUTHENTIK_REDIS__HOST: redis-authentik
|
|
AUTHENTIK_POSTGRESQL__HOST: postgresql-authentik
|
|
AUTHENTIK_POSTGRESQL__NAME: "{{ authentik_db }}"
|
|
AUTHENTIK_POSTGRESQL__USER: "{{ authentik_db_user }}"
|
|
AUTHENTIK_POSTGRESQL__PASSWORD: "{{ authentik_db_password }}"
|
|
# AUTHENTIK_ERROR_REPORTING__ENABLED: "true"
|
|
# WORKERS: 2
|
|
volumes:
|
|
- {{ authentik_volume_media }}:/media
|
|
- {{ authentik_volume_templates }}:/templates
|
|
- {{ authentik_volume_geoip }}:/geoip
|
|
env_file:
|
|
- {{ authentik_volume_config }}/env.authentik.conf
|
|
ports:
|
|
- "0.0.0.0:{{ authentik_port_http }}:9000"
|
|
- "0.0.0.0:{{ authentik_port_https }}:9443"
|
|
networks:
|
|
- authentik
|
|
worker:
|
|
image: ghcr.io/goauthentik/server:{{ authentik_image_version }}
|
|
restart: unless-stopped
|
|
command: worker
|
|
environment:
|
|
AUTHENTIK_REDIS__HOST: redis-authentik
|
|
AUTHENTIK_POSTGRESQL__HOST: postgresql-authentik
|
|
AUTHENTIK_POSTGRESQL__NAME: "{{ authentik_db }}"
|
|
AUTHENTIK_POSTGRESQL__USER: "{{ authentik_db_user }}"
|
|
AUTHENTIK_POSTGRESQL__PASSWORD: "{{ authentik_db_password }}"
|
|
# AUTHENTIK_ERROR_REPORTING__ENABLED: "true"
|
|
# This is optional, and can be removed. If you remove this, the following will happen
|
|
# - The permissions for the /media folders aren't fixed, so make sure they are 1000:1000
|
|
# - The docker socket can't be accessed anymore
|
|
user: root
|
|
volumes:
|
|
- {{ authentik_volume_media }}:/media
|
|
- {{ authentik_volume_certs }}:/certs
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- {{ authentik_volume_templates }}:/templates
|
|
- {{ authentik_volume_geoip }}:/geoip
|
|
env_file:
|
|
- {{ authentik_volume_config }}/env.authentik.conf
|
|
geoipupdate:
|
|
image: "maxmindinc/geoipupdate:latest"
|
|
volumes:
|
|
- "{{ authentik_volume_geoip }}:/usr/share/GeoIP"
|
|
environment:
|
|
GEOIPUPDATE_EDITION_IDS: "GeoLite2-City"
|
|
GEOIPUPDATE_FREQUENCY: "8"
|
|
env_file:
|
|
- {{ authentik_volume_config }}/env.authentik.conf
|
|
networks:
|
|
- authentik
|
|
|
|
networks:
|
|
authentik: {}
|