Dockerfile•522 B
# Use Python 3.12 slim image
FROM python:3.12-slim
# Install UV
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
# Set working directory
WORKDIR /app
# Copy dependency files first for better caching
COPY pyproject.toml uv.lock ./
# Install dependencies using UV
RUN uv sync --frozen --no-dev
# Copy source code
COPY src/ src/
# Set environment variables
ENV PYTHONPATH=/app/src
ENV UV_PROJECT_ENVIRONMENT=/app/.venv
# Expose port 3001
EXPOSE 3001
# Run the application
CMD ["uv", "run", "python", "src/main.py"]