FROM python:3.11-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ libpq-dev \ && rm -rf /var/lib/apt/lists/* # Install uv for package management RUN pip install uv # Copy dependency files first for better caching COPY pyproject.toml uv.lock ./ # Install Python dependencies RUN uv sync --frozen --no-dev # Copy application code COPY . . # Set Python path ENV PYTHONPATH=/app/apps EXPOSE 8080 CMD ["python", "main.py", "start", "web"]