This commit is contained in:
2025-05-18 05:21:16 -05:00
parent 132073ca19
commit c19bedc54a
65 changed files with 705 additions and 575 deletions

View File

@ -9,6 +9,7 @@ services:
- FLASK_APP=app
- FLASK_ENV=development
- USE_REMOTE_MYSQL=${USE_REMOTE_MYSQL}
- ENABLE_DB_PRELOAD=${ENABLE_DB_PRELOAD}
- ENABLE_DB_SEEDING=${ENABLE_DB_SEEDING}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
@ -18,10 +19,12 @@ services:
depends_on:
- db
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:5000/health"]
interval: 30s
timeout: 10s
retries: 5
test: ["CMD-SHELL", "curl -fs http://127.0.0.1:5000/health || exit 1"]
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
command: >
bash -c "
set -e
@ -43,6 +46,12 @@ services:
echo '[✔] Running DB migrations...'
flask db upgrade
if [ "$$ENABLE_DB_PRELOAD" = "1" ]; then
echo '[📥] Preloading data...'; flask preload-data;
else
echo '[⚠️] Skipping preload...';
fi
if [ \"$$ENABLE_DB_SEEDING\" = \"1\" ]; then
echo '[🌱] Seeding admin user...'