Skip to content

Commit b1a4704

Browse files
committed
Remove unsupported options for Docker swarm
Warning was: ``` Ignoring unsupported options: build, restart, shm_size ```
1 parent 5152912 commit b1a4704

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

docker-compose.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,13 @@ services:
2525
# debian image is used, as alpine can have problems with locals
2626
# see https://github.com/docker-library/docs/blob/master/postgres/README.md#locale-customization
2727
image: docker.io/library/postgres:14.12-bookworm
28-
restart: always
2928
environment:
3029
POSTGRES_DB: inyoka
3130
# TODO defines superuser name -> do not use superuser from inyoka?
3231
POSTGRES_USER: inyoka
3332
POSTGRES_PASSWORD_FILE: /run/secrets/inyoka-postgres-password
3433
POSTGRES_HOST_AUTH_METHOD: "scram-sha-256"
3534
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
3835
# https://github.com/docker-library/postgres/blob/a83005b407ee6d810413500d8a041c957fb10cf0/14/bullseye/Dockerfile#L211-L213
3936
# https://www.postgresql.org/docs/14/server-start.html suggests no timeout
4037
stop_grace_period: 5m
@@ -46,15 +43,21 @@ services:
4643
- inyoka-postgres-password
4744
volumes:
4845
- 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+
4954

5055
inyoka-worker:
5156
<< : *default-django
52-
restart: always
5357
command: /inyoka/venv/bin/gunicorn -b 0.0.0.0:8000 --workers 24 --max-requests 500 inyoka.wsgi:application
5458

5559
redis:
5660
image: docker.io/library/redis:7.0.15-alpine
57-
restart: always
5861
command: redis-server /etc/redis/redis.conf
5962
configs:
6063
- source: redis-config
@@ -69,19 +72,16 @@ services:
6972

7073
celeryworker:
7174
<< : *default-django
72-
restart: always
7375
command: /inyoka/venv/bin/celery --app=inyoka worker --loglevel=INFO --concurrency=8
7476

7577
celerybeat:
7678
<< : *default-django
77-
restart: always
7879
command: /inyoka/venv/bin/celery --app=inyoka beat --pidfile /tmp/celerybeat.pid --loglevel=INFO --schedule /volume/celerybeat-schedule/celerybeat-schedule
7980
volumes:
8081
- celerybeat-schedule:/volume/celerybeat-schedule
8182

8283
caddy:
8384
image: git.ubuntu-eu.org/ubuntuusers/caddy-inyoka
84-
restart: unless-stopped
8585
volumes:
8686
- caddy_data:/data
8787
- caddy_config:/config

docker-development.yml

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ services:
2222

2323
inyoka-worker:
2424
<< : *dev-django
25-
build:
26-
context: ./
27-
dockerfile: Dockerfile
2825
environment:
2926
<< : *dev-env
3027
extra_hosts:

0 commit comments

Comments
 (0)