# Generated by `skaal build --target local`. Do not edit manually.
# Build context is the artifacts directory (self-contained: main.py, pyproject.toml, source package).
$mesh_build_stage
FROM python:3.11-slim

ENV PYTHONUNBUFFERED=1

WORKDIR /app

# Create the data directory used by SQLite and any other file-backed backends.
# aiosqlite will fail with OperationalError if this directory is absent.
RUN mkdir -p /app/data

# Install `uv` to sync dependencies from pyproject.toml
RUN pip install --no-cache-dir uv

# Copy artifact files into the image.
COPY . .

# Install runtime dependencies.
RUN uv sync --no-dev
$mesh_install_step
# Ensure /app is in Python path so gunicorn can find main.py and the source package
ENV PYTHONPATH=/app

EXPOSE 8000

CMD ["uv", "run", "gunicorn", "--bind", "0.0.0.0:8000", "--workers", "1", "--timeout", "120"$gunicorn_worker, "main:application"]
