Files
WebTech/entrypoint.sh
2025-04-21 14:01:53 +02:00

12 lines
288 B
Bash

#!/bin/bash
# Wait for DB to be ready (optional step)
# ./wait-for-it.sh db:5432 --timeout=30 -- echo "DB is up"
# Only run flask db init if migrations folder doesn't exist
if [ ! -d "migrations" ]; then
flask db init
fi
flask db migrate -m "Autogenerated migration"
flask db upgrade