2019-10-04 10:50:26 +01:00
|
|
|
---
|
2022-05-26 08:56:00 +01:00
|
|
|
version: '3.4'
|
2019-10-04 10:50:26 +01:00
|
|
|
|
|
|
|
services:
|
|
|
|
postgresql:
|
2022-09-03 23:30:47 +01:00
|
|
|
image: docker.io/library/postgres:12-alpine
|
2021-04-16 08:03:58 +01:00
|
|
|
restart: unless-stopped
|
2022-05-26 08:56:00 +01:00
|
|
|
healthcheck:
|
2022-06-24 11:02:05 +01:00
|
|
|
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
2022-05-26 08:56:00 +01:00
|
|
|
start_period: 20s
|
|
|
|
interval: 30s
|
|
|
|
retries: 5
|
|
|
|
timeout: 5s
|
2019-10-04 10:50:26 +01:00
|
|
|
volumes:
|
|
|
|
- database:/var/lib/postgresql/data
|
|
|
|
environment:
|
2021-08-26 09:24:35 +01:00
|
|
|
- POSTGRES_PASSWORD=${PG_PASS:?database password required}
|
2020-12-14 11:27:33 +00:00
|
|
|
- POSTGRES_USER=${PG_USER:-authentik}
|
|
|
|
- POSTGRES_DB=${PG_DB:-authentik}
|
2020-09-14 21:54:25 +01:00
|
|
|
env_file:
|
|
|
|
- .env
|
2019-10-04 10:50:26 +01:00
|
|
|
redis:
|
2022-09-03 23:30:47 +01:00
|
|
|
image: docker.io/library/redis:alpine
|
|
|
|
command: --save 60 1 --loglevel warning
|
2021-05-03 17:28:46 +01:00
|
|
|
restart: unless-stopped
|
2022-05-26 08:56:00 +01:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
|
|
|
start_period: 20s
|
|
|
|
interval: 30s
|
|
|
|
retries: 5
|
|
|
|
timeout: 3s
|
2022-09-03 23:30:47 +01:00
|
|
|
volumes:
|
|
|
|
- redis:/data
|
2019-10-04 10:50:26 +01:00
|
|
|
server:
|
2023-03-16 21:43:57 +00:00
|
|
|
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2023.3.1}
|
2021-04-16 08:03:58 +01:00
|
|
|
restart: unless-stopped
|
2020-09-02 23:04:12 +01:00
|
|
|
command: server
|
2019-10-04 10:50:26 +01:00
|
|
|
environment:
|
2020-12-05 21:08:42 +00:00
|
|
|
AUTHENTIK_REDIS__HOST: redis
|
|
|
|
AUTHENTIK_POSTGRESQL__HOST: postgresql
|
2020-12-14 11:27:33 +00:00
|
|
|
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
|
|
|
|
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
|
2020-12-05 21:08:42 +00:00
|
|
|
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
|
2020-11-23 19:50:19 +00:00
|
|
|
volumes:
|
|
|
|
- ./media:/media
|
2021-01-04 23:41:10 +00:00
|
|
|
- ./custom-templates:/templates
|
2020-09-14 21:54:25 +01:00
|
|
|
env_file:
|
|
|
|
- .env
|
2021-05-02 23:49:16 +01:00
|
|
|
ports:
|
2023-01-18 18:03:36 +00:00
|
|
|
- "${AUTHENTIK_PORT_HTTP:-9000}:9000"
|
|
|
|
- "${AUTHENTIK_PORT_HTTPS:-9443}:9443"
|
2019-10-04 10:50:26 +01:00
|
|
|
worker:
|
2023-03-16 21:43:57 +00:00
|
|
|
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2023.3.1}
|
2021-04-16 08:03:58 +01:00
|
|
|
restart: unless-stopped
|
2020-09-02 23:04:12 +01:00
|
|
|
command: worker
|
2019-10-04 10:50:26 +01:00
|
|
|
environment:
|
2020-12-05 21:08:42 +00:00
|
|
|
AUTHENTIK_REDIS__HOST: redis
|
|
|
|
AUTHENTIK_POSTGRESQL__HOST: postgresql
|
2020-12-14 11:27:33 +00:00
|
|
|
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
|
|
|
|
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
|
2020-12-05 21:08:42 +00:00
|
|
|
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
|
2022-12-12 17:06:26 +00:00
|
|
|
# `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)
|
2021-05-13 19:11:49 +01:00
|
|
|
user: root
|
2020-10-03 19:36:36 +01:00
|
|
|
volumes:
|
2022-12-12 17:06:26 +00:00
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2021-05-13 19:11:49 +01:00
|
|
|
- ./media:/media
|
2021-12-03 17:27:06 +00:00
|
|
|
- ./certs:/certs
|
2021-01-04 23:41:10 +00:00
|
|
|
- ./custom-templates:/templates
|
2021-03-11 15:42:19 +00:00
|
|
|
env_file:
|
|
|
|
- .env
|
2019-10-04 10:50:26 +01:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
database:
|
|
|
|
driver: local
|
2022-09-03 23:30:47 +01:00
|
|
|
redis:
|
|
|
|
driver: local
|