-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
executable file
·106 lines (100 loc) · 3.32 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Installation: https://hub.docker.com/r/beryju/authentik
services:
server:
image: beryju/authentik:2024.12
container_name: authentik
restart: unless-stopped
command: server
user: root
environment:
- AUTHENTIK_REDIS__HOST=${AUTHENTIK_REDIS__HOST}
- AUTHENTIK_POSTGRESQL__HOST=${AUTHENTIK_POSTGRESQL__HOST}
- AUTHENTIK_POSTGRESQL__USER=${AUTHENTIK_POSTGRESQL__USER}
- AUTHENTIK_POSTGRESQL__NAME=${AUTHENTIK_POSTGRESQL__NAME}
- AUTHENTIK_POSTGRESQL__PASSWORD=${AUTHENTIK_POSTGRESQL__PASSWORD}
- AUTHENTIK_ERROR_REPORTING__ENABLED=${AUTHENTIK_ERROR_REPORTING__ENABLED}
- AUTHENTIK_SECRET_KEY=${AUTHENTIK_SECRET_KEY}
volumes:
- /opt/appdata/authentik/media:/media
- /opt/appdata/authentik/custom-templates:/templates
ports:
- 9815:9000
- 9816:9443
depends_on:
- postgresql-authentik
- redis-authentik
networks:
- proxy
worker:
image: beryju/authentik:2024.12
container_name: authentik_worker
restart: unless-stopped
command: worker
environment:
- AUTHENTIK_REDIS__HOST=${AUTHENTIK_REDIS__HOST}
- AUTHENTIK_POSTGRESQL__HOST=${AUTHENTIK_POSTGRESQL__HOST}
- AUTHENTIK_POSTGRESQL__USER=${AUTHENTIK_POSTGRESQL__USER}
- AUTHENTIK_POSTGRESQL__NAME=${AUTHENTIK_POSTGRESQL__NAME}
- AUTHENTIK_POSTGRESQL__PASSWORD=${AUTHENTIK_POSTGRESQL__PASSWORD}
- AUTHENTIK_ERROR_REPORTING__ENABLED=${AUTHENTIK_ERROR_REPORTING__ENABLED}
- AUTHENTIK_SECRET_KEY=${AUTHENTIK_SECRET_KEY}
# `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:
- /opt/appdata/authentik/media:/media
- /opt/appdata/authentik/certs:/certs
- /var/run/docker.sock:/var/run/docker.sock
- /opt/appdata/authentik/custom-templates:/templates
depends_on:
- postgresql-authentik
- redis-authentik
networks:
- proxy
postgresql-authentik:
image: postgres:17-alpine3.19
container_name: postgresql-authentik
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}']
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
environment:
- POSTGRES_USER=${AUTHENTIK_POSTGRESQL__USER}
- POSTGRES_DB=${AUTHENTIK_POSTGRESQL__NAME}
- POSTGRES_PASSWORD=${AUTHENTIK_POSTGRESQL__PASSWORD:?database password required}
volumes:
- authentik-postgresql-volume:/var/lib/postgresql/data
ports:
- 5432:8080
networks:
- proxy
redis-authentik:
image: redis:alpine3.19
container_name: redis-authentik
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping | grep PONG']
start_period: 20s
interval: 30s
retries: 5
timeout: 3s
volumes:
- authentik-redis-volume:/data
ports:
- 6379:6379
networks:
- proxy
volumes:
authentik-postgresql-volume: {}
authentik-redis-volume: {}
networks:
proxy:
driver: bridge
external: true