Skip to content

Commit 2bb56b8

Browse files
committed
refactor(docker/community): restore mongodb healthcheck
if a container is a dependency for an other container it should not be removed. according to the documentation the compose argument none could be applied: https://docs.docker.com/reference/dockerfile/#healthcheck
1 parent 460430f commit 2bb56b8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docker/community/docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ services:
3434
- mongodb:/data/db
3535
ports:
3636
- 27017:27017
37+
healthcheck:
38+
test:
39+
[
40+
'CMD-SHELL',
41+
"echo 'db.runCommand({ ping: 1 }).ok' | mongosh mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@127.0.0.1:27017/admin --quiet",
42+
]
43+
interval: 30s
44+
timeout: 10s
45+
retries: 5
46+
start_period: 60s
3747

3848
api:
3949
image: 'ghcr.io/novuhq/novu/api:2.1.1'

0 commit comments

Comments
 (0)