#!/usr/bin/env bash # App entrypoint: apply migrations, then launch the API. set -e cd /app echo "[entrypoint] running migrations..." # `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 echo "[entrypoint] starting uvicorn..." exec uvicorn app.main:app --host 0.0.0.0 --port 8000