#!/bin/sh
set -e

echo "=== Running Alembic migrations ==="
alembic upgrade head

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

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

echo "=== Starting uvicorn ==="
exec uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
