Skip to content

Commit

Permalink
Update docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cyri113 authored Jan 4, 2024
1 parent e1035bd commit a78d8c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
container_name: mongodb-dev
restart: unless-stopped
# command: ["--replSet", "rs0", "--bind_ip_all", "--port", "27017", "--keyFile", "/etc/mongo/replica.key"]
command: ["--replSet", "rs0", "--keyFile", "/etc/mongo/replica.key"]
# command: ["--replSet", "rs0", "--keyFile", "/etc/mongo/replica.key"]
ports:
- 37017:27017
env_file:
Expand All @@ -34,8 +34,8 @@ services:
# chmod 400 /etc/mongo/replica.key
# chown 999:999 /etc/mongo/replica.key
healthcheck:
# test: echo 'db.stats().ok' | mongosh localhost:27017/test --quiet
test: test $$(echo "rs.initiate().ok || rs.status().ok") | mongosh localhost:27017/test --quiet
test: echo 'db.stats().ok' | mongosh localhost:27017/test --quiet
# test: test $$(echo "rs.initiate().ok || rs.status().ok") | mongosh localhost:27017/test --quiet
# test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'mongodb-dev'}]}) }" | mongosh --port 27017 --quiet
interval: 60s
timeout: 10s
Expand Down

0 comments on commit a78d8c5

Please sign in to comment.