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:
anthorob committed 2026-10-18 01:53:10 -04:00
1 parent 78d6ade17a
commit d0ea0535e2
2 files changed
+10 -5

No files matched your search

-3
View File
@@ -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..";