docker compose update

This commit is contained in:
Christian Lempa 2024-03-26 13:32:19 +01:00
parent f24e70acfb
commit 6ad4e19da2

View File

@ -4,17 +4,18 @@ services:
image: postgres:16.2
container_name: authentik-db
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER:-authentik}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?error}
- POSTGRES_DB=${POSTGRES_DB:-authentik}
- TZ=${TZ:-UTC}
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
start_period: 20s
interval: 30s
test: ['CMD-SHELL', 'pg_isready -U "${POSTGRES_USER:-authentik}"']
start_period: 30s
interval: 10s
timeout: 10s
retries: 5
timeout: 5s
volumes:
- postgres-data:/var/lib/postgresql/data
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:7.2.4
@ -27,7 +28,7 @@ services:
retries: 5
timeout: 3s
volumes:
- redis-data:/data
- redis_data:/data
restart: unless-stopped
server:
image: ghcr.io/goauthentik/server:2024.2.2
@ -36,23 +37,23 @@ services:
environment:
- AUTHENTIK_REDIS__HOST=authentik-redis
- AUTHENTIK_POSTGRESQL__HOST=authentik-db
- AUTHENTIK_POSTGRESQL__USER=${POSTGRES_USER}
- AUTHENTIK_POSTGRESQL__NAME=${POSTGRES_DB}
- AUTHENTIK_POSTGRESQL__PASSWORD=${POSTGRES_PASSWORD}
- AUTHENTIK_POSTGRESQL__USER=${POSTGRES_USER:-authentik}
- AUTHENTIK_POSTGRESQL__NAME=${POSTGRES_DB:-authentik}
- AUTHENTIK_POSTGRESQL__PASSWORD=${POSTGRES_PASSWORD:?error}
# (Required) To generate a secret key run the following command:
# echo $(openssl rand -base64 32)
- AUTHENTIK_SECRET_KEY=${AUTHENTIK_SECRET_KEY}
- AUTHENTIK_SECRET_KEY=${AUTHENTIK_SECRET_KEY:?error}
# (Optional) Enable Error Reporting
# - AUTHENTIK_ERROR_REPORTING__ENABLED=true
# - AUTHENTIK_ERROR_REPORTING__ENABLED=${AUTHENTIK_ERROR_REPORTING:-false}
# (Optional) Enable Email Sending
# - AUTHENTIK_EMAIL__HOST=localhost
# - AUTHENTIK_EMAIL__PORT=25
# - AUTHENTIK_EMAIL__USERNAME=${EMAIL_USERNAME}
# - AUTHENTIK_EMAIL__PASSWORD=${EMAIL_PASSWORD}
# - AUTHENTIK_EMAIL__USE_TLS=false
# - AUTHENTIK_EMAIL__USE_SSL=false
# - AUTHENTIK_EMAIL__TIMEOUT=10
# - AUTHENTIK_EMAIL__FROM=authentik@localhost # replace with your email address
# - AUTHENTIK_EMAIL__HOST=${EMAIL_HOST:?error}
# - AUTHENTIK_EMAIL__PORT=${EMAIL_PORT:-25}
# - AUTHENTIK_EMAIL__USERNAME=${EMAIL_USERNAME:?error}
# - AUTHENTIK_EMAIL__PASSWORD=${EMAIL_PASSWORD:?error}
# - AUTHENTIK_EMAIL__USE_TLS=${EMAIL_USE_TLS:-false}
# - AUTHENTIK_EMAIL__USE_SSL=${EMAIL_USE_SSL:-false}
# - AUTHENTIK_EMAIL__TIMEOUT=${EMAIL_TIMEOUT:-10}
# - AUTHENTIK_EMAIL__FROM=${EMAIL_FROM:?error}
ports:
- 9000:9000
- 9443:9443
@ -60,7 +61,7 @@ services:
- ./media:/media
- ./custom-templates:/templates
depends_on:
- postgresql
- postgres
- redis
restart: unless-stopped
worker:
@ -70,9 +71,23 @@ services:
environment:
- AUTHENTIK_REDIS__HOST=authentik-redis
- AUTHENTIK_POSTGRESQL__HOST=authentik-db
- AUTHENTIK_POSTGRESQL__USER=${POSTGRES_USER}
- AUTHENTIK_POSTGRESQL__NAME=${POSTGRES_DB}
- AUTHENTIK_POSTGRESQL__PASSWORD=${POSTGRES_PASSWORD}
- AUTHENTIK_POSTGRESQL__USER=${POSTGRES_USER:-authentik}
- AUTHENTIK_POSTGRESQL__NAME=${POSTGRES_DB:-authentik}
- AUTHENTIK_POSTGRESQL__PASSWORD=${POSTGRES_PASSWORD:?error}
# (Required) To generate a secret key run the following command:
# echo $(openssl rand -base64 32)
- AUTHENTIK_SECRET_KEY=${AUTHENTIK_SECRET_KEY:?error}
# (Optional) Enable Error Reporting
# - AUTHENTIK_ERROR_REPORTING__ENABLED=${AUTHENTIK_ERROR_REPORTING:-false}
# (Optional) Enable Email Sending
# - AUTHENTIK_EMAIL__HOST=${EMAIL_HOST:?error}
# - AUTHENTIK_EMAIL__PORT=${EMAIL_PORT:-25}
# - AUTHENTIK_EMAIL__USERNAME=${EMAIL_USERNAME:?error}
# - AUTHENTIK_EMAIL__PASSWORD=${EMAIL_PASSWORD:?error}
# - AUTHENTIK_EMAIL__USE_TLS=${EMAIL_USE_TLS:-false}
# - AUTHENTIK_EMAIL__USE_SSL=${EMAIL_USE_SSL:-false}
# - AUTHENTIK_EMAIL__TIMEOUT=${EMAIL_TIMEOUT:-10}
# - AUTHENTIK_EMAIL__FROM=${EMAIL_FROM:?error}
# (Optional) When using the docker socket integration
# See more for the docker socket integration here:
# https://goauthentik.io/docs/outposts/integrations/docker
@ -84,12 +99,12 @@ services:
- ./certs:/certs
- ./custom-templates:/templates
depends_on:
- postgresql
- postgres
- redis
restart: unless-stopped
volumes:
postgres-data:
postgres_data:
driver: local
redis-data:
redis_data:
driver: local