FROM python:3.12-slim

WORKDIR /app

# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv

# Copy dependency files and install — leverages Docker layer cache
COPY pyproject.toml ./
RUN uv sync --no-dev

COPY . .

EXPOSE 5000

CMD ["uv", "run", "flask", "--app", "wsgi:app", "run", "--host=0.0.0.0", "--port=5000"]
