#!/bin/sh
set -e

echo "=== [PROD] Running Alembic migrations ==="
alembic upgrade head

echo "=== [PROD] Seeding admin user ==="
python -m app.seed

echo "=== [PROD] Seeding data sources ==="
python -m app.seed_data_sources

echo "=== [PROD] Starting uvicorn (production) ==="
exec uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4
