Add health checks and dependency conditions in docker-compose.yml
Introduced health checks for `netneutrality-db` to ensure proper readiness before dependent services start. Replaced static sleep in `startup.sh` with dynamic database availability checks, improving startup reliability and reducing downtime risks.
This commit is contained in:
1 parent
78d6ade17a
commit
d0ea0535e2
2 files changed
+10
-5
No files matched your search
@@ -26,9 +26,6 @@ if [ ! -f /usr/bin/nc ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Waiting 10 seconds for database to start.."
|
||||
sleep 10
|
||||
|
||||
echo "Checking if MySQL / MariaDB is started.."
|
||||
if /usr/bin/nc -z $MYSQL_HOST $MYSQL_PORT; then
|
||||
echo "Database OK. Starting bot..";
|
||||
|
||||
Reference in new issue
Block a user