FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim

WORKDIR /app
COPY pyproject.toml uv.lock ./
COPY bff/pyproject.toml ./bff/pyproject.toml
COPY logic/pyproject.toml ./logic/pyproject.toml
RUN uv sync --frozen --no-dev --all-packages
COPY logic/app ./logic/app
COPY logic/alembic.ini ./logic/alembic.ini
COPY logic/alembic ./logic/alembic
WORKDIR /app/logic

EXPOSE 8000
CMD ["/app/.venv/bin/uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
