FROM python:3.12-slim WORKDIR /app ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app ./app COPY alembic.ini . COPY alembic/ ./alembic/ EXPOSE 8000 # migrations run from the compose command (alembic upgrade head && uvicorn …) — the house pattern CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]