Production

This commit is contained in:
Shubhankar45
2026-09-22 06:23:46 +00:00
commit 8fdd20b29f
217 changed files with 31212 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
# Container entrypoint: bring the schema up to date, then hand over to the server.
# Migrations are idempotent, so restarting the container is always safe. Data import
# scripts (which replace table contents) are never run from here.
set -eu
if [ "${RUN_MIGRATIONS:-1}" = "1" ]; then
attempt=1
until alembic upgrade head; do
if [ "$attempt" -ge 15 ]; then
echo "entrypoint: database migration failed after $attempt attempts" >&2
exit 1
fi
echo "entrypoint: database not ready (attempt $attempt), retrying in 3s" >&2
attempt=$((attempt + 1))
sleep 3
done
fi
exec "$@"