Skip to content

Commit

Permalink
fix: healthcheck command for mongodb
Browse files Browse the repository at this point in the history
  • Loading branch information
kasir-barati committed Nov 29, 2024
1 parent c37573d commit d8f8bdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# How to start the compose file

1. `cp .env.example .env`
2. `docker-compose up`
2. `docker compose up`

# How to stop and delete all the MongoDB information

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
env_file:
- .env
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/${MONGO_INITDB_DATABASE} --quiet
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 5s
retries: 3
Expand All @@ -33,6 +33,7 @@ services:

mongoexpress:
image: mongo-express:0.54.0
container_name: mongodb-express
ports:
- 8081:8081
depends_on:
Expand Down

0 comments on commit d8f8bdc

Please sign in to comment.