10 lines
230 B
Bash
10 lines
230 B
Bash
#!/bin/bash
|
|
# healthcheck.sh pour MongoDB
|
|
|
|
# Attente que le port MongoDB soit ouvert
|
|
nc -z localhost 27017 || exit 1
|
|
|
|
# Ping MongoDB pour confirmer qu'il fonctionne
|
|
mongo --quiet --eval "db.adminCommand('ping')" || exit 1
|
|
|
|
exit 0
|