@@ -25,16 +25,13 @@ services:
25
25
# debian image is used, as alpine can have problems with locals
26
26
# see https://github.com/docker-library/docs/blob/master/postgres/README.md#locale-customization
27
27
image : docker.io/library/postgres:14.12-bookworm
28
- restart : always
29
28
environment :
30
29
POSTGRES_DB : inyoka
31
30
# TODO defines superuser name -> do not use superuser from inyoka?
32
31
POSTGRES_USER : inyoka
33
32
POSTGRES_PASSWORD_FILE : /run/secrets/inyoka-postgres-password
34
33
POSTGRES_HOST_AUTH_METHOD : " scram-sha-256"
35
34
POSTGRES_INITDB_ARGS : " --data-checksums"
36
- # increase shared memory like recommended at https://github.com/docker-library/docs/blob/master/postgres/README.md#caveats
37
- shm_size : 256M
38
35
# https://github.com/docker-library/postgres/blob/a83005b407ee6d810413500d8a041c957fb10cf0/14/bullseye/Dockerfile#L211-L213
39
36
# https://www.postgresql.org/docs/14/server-start.html suggests no timeout
40
37
stop_grace_period : 5m
@@ -46,15 +43,21 @@ services:
46
43
- inyoka-postgres-password
47
44
volumes :
48
45
- postgres-data:/var/lib/postgresql/data
46
+ # increase shared memory like recommended at https://github.com/docker-library/docs/blob/master/postgres/README.md#caveats
47
+ # shm_size is not supported in docker swarm
48
+ # workaround: https://github.com/moby/moby/issues/26714#issuecomment-579820612
49
+ - type : tmpfs
50
+ target : /dev/shm
51
+ tmpfs :
52
+ size : 268435456
53
+
49
54
50
55
inyoka-worker :
51
56
<< : *default-django
52
- restart : always
53
57
command : /inyoka/venv/bin/gunicorn -b 0.0.0.0:8000 --workers 24 --max-requests 500 inyoka.wsgi:application
54
58
55
59
redis :
56
60
image : docker.io/library/redis:7.0.15-alpine
57
- restart : always
58
61
command : redis-server /etc/redis/redis.conf
59
62
configs :
60
63
- source : redis-config
@@ -69,19 +72,16 @@ services:
69
72
70
73
celeryworker :
71
74
<< : *default-django
72
- restart : always
73
75
command : /inyoka/venv/bin/celery --app=inyoka worker --loglevel=INFO --concurrency=8
74
76
75
77
celerybeat :
76
78
<< : *default-django
77
- restart : always
78
79
command : /inyoka/venv/bin/celery --app=inyoka beat --pidfile /tmp/celerybeat.pid --loglevel=INFO --schedule /volume/celerybeat-schedule/celerybeat-schedule
79
80
volumes :
80
81
- celerybeat-schedule:/volume/celerybeat-schedule
81
82
82
83
caddy :
83
84
image : git.ubuntu-eu.org/ubuntuusers/caddy-inyoka
84
- restart : unless-stopped
85
85
volumes :
86
86
- caddy_data:/data
87
87
- caddy_config:/config
0 commit comments