mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-11-09 16:36:34 +00:00
docker-compose: Default all services to restart unless-stopped.
`restart:` was previously inconsistently provided to service definitions (only memcached and rabbitmq) and at that, the restart policy was `always`. `always` can lead to surprising behavior where restarts of the docker daemon will resurrect explicitly-stopped containers, whereas `unless-stopped` will leave explicitly-stopped containers stopped. Set all services in the docker-compose file to `restart: unless-stopped`. Further reading: https://linuxhandbook.com/docker-restart-policy/
This commit is contained in:
committed by
Josh Klar
parent
65f33b502f
commit
576a71e1b8
@@ -2,6 +2,7 @@ version: "2"
|
|||||||
services:
|
services:
|
||||||
database:
|
database:
|
||||||
image: "zulip/zulip-postgresql:10"
|
image: "zulip/zulip-postgresql:10"
|
||||||
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: "zulip"
|
POSTGRES_DB: "zulip"
|
||||||
POSTGRES_USER: "zulip"
|
POSTGRES_USER: "zulip"
|
||||||
@@ -13,6 +14,7 @@ services:
|
|||||||
- "/opt/docker/zulip/postgresql/data:/var/lib/postgresql/data:rw"
|
- "/opt/docker/zulip/postgresql/data:/var/lib/postgresql/data:rw"
|
||||||
memcached:
|
memcached:
|
||||||
image: "memcached:alpine"
|
image: "memcached:alpine"
|
||||||
|
restart: unless-stopped
|
||||||
command:
|
command:
|
||||||
- "sh"
|
- "sh"
|
||||||
- "-euc"
|
- "-euc"
|
||||||
@@ -25,10 +27,9 @@ services:
|
|||||||
SASL_CONF_PATH: "/home/memcache/memcached.conf"
|
SASL_CONF_PATH: "/home/memcache/memcached.conf"
|
||||||
MEMCACHED_SASL_PWDB: "/home/memcache/memcached-sasl-db"
|
MEMCACHED_SASL_PWDB: "/home/memcache/memcached-sasl-db"
|
||||||
MEMCACHED_PASSWORD: "REPLACE_WITH_SECURE_MEMCACHED_PASSWORD"
|
MEMCACHED_PASSWORD: "REPLACE_WITH_SECURE_MEMCACHED_PASSWORD"
|
||||||
restart: always
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
image: "rabbitmq:3.7.7"
|
image: "rabbitmq:3.7.7"
|
||||||
restart: always
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
RABBITMQ_DEFAULT_USER: "zulip"
|
RABBITMQ_DEFAULT_USER: "zulip"
|
||||||
RABBITMQ_DEFAULT_PASS: "REPLACE_WITH_SECURE_RABBITMQ_PASSWORD"
|
RABBITMQ_DEFAULT_PASS: "REPLACE_WITH_SECURE_RABBITMQ_PASSWORD"
|
||||||
@@ -36,6 +37,7 @@ services:
|
|||||||
- "/opt/docker/zulip/rabbitmq:/var/lib/rabbitmq:rw"
|
- "/opt/docker/zulip/rabbitmq:/var/lib/rabbitmq:rw"
|
||||||
redis:
|
redis:
|
||||||
image: "redis:alpine"
|
image: "redis:alpine"
|
||||||
|
restart: unless-stopped
|
||||||
command:
|
command:
|
||||||
- "sh"
|
- "sh"
|
||||||
- "-euc"
|
- "-euc"
|
||||||
@@ -48,6 +50,7 @@ services:
|
|||||||
- "/opt/docker/zulip/redis:/data:rw"
|
- "/opt/docker/zulip/redis:/data:rw"
|
||||||
zulip:
|
zulip:
|
||||||
image: "zulip/docker-zulip:5.7-0"
|
image: "zulip/docker-zulip:5.7-0"
|
||||||
|
restart: unless-stopped
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
args:
|
args:
|
||||||
|
|||||||
Reference in New Issue
Block a user