2026-07-07 18:24:01 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
# App entrypoint: apply migrations, then launch the API.
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
cd /app
|
|
|
|
|
echo "[entrypoint] running migrations..."
|
2026-08-28 18:29:06 -04:00
|
|
|
# `heads` (plural): parallel PRs can fork the chain (005_phase2 + 005_news_items).
|
|
|
|
|
# `upgrade head` then exits 255 and crash-loops the container.
|
|
|
|
|
alembic upgrade heads
|
2026-07-07 18:24:01 -04:00
|
|
|
|
|
|
|
|
echo "[entrypoint] starting uvicorn..."
|
|
|
|
|
exec uvicorn app.main:app --host 0.0.0.0 --port 8000
|