#!/bin/sh
# Migrate, seed, then serve. Alembic is the only thing that touches schema.
set -e

echo "dailysplice: running migrations"
alembic upgrade head

echo "dailysplice: seeding founding invites (idempotent)"
python -m scripts.seed

echo "dailysplice: starting uvicorn on :3000"
exec uvicorn app.main:app --host 0.0.0.0 --port 3000 \
    --proxy-headers --forwarded-allow-ips '*'
