mirror of
https://github.com/anyproto/any-sync-dockercompose.git
synced 2025-06-08 05:47:03 +09:00
fix mongo healthcheck command
This commit is contained in:
parent
851ef49bc7
commit
8132a3d423
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ services:
|
|||
volumes:
|
||||
- ./storage/mongo-1/:/data/db
|
||||
healthcheck:
|
||||
test: test $$(mongosh --port ${MONGO_1_PORT} --quiet --eval "try {rs.initiate({_id:'${MONGO_REPLICA_SET}',members:[{_id:0,host:\"mongo-1:${MONGO_1_PORT}\"}]})} catch(e) {rs.status().ok}") -eq 1
|
||||
test: test $$(mongosh --port ${MONGO_1_PORT} --quiet --eval "try {rs.status().ok || rs.initiate({_id:'${MONGO_REPLICA_SET}',members:[{_id:0,host:\"mongo-1:${MONGO_1_PORT}\"}]}).ok} catch(e) {rs.status().ok}" | grep -v asio.system) -eq 1
|
||||
interval: 10s
|
||||
start_period: 30s
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue