Files
plex-playlist/Dockerfile.backend
copilotcoder 158a577761
All checks were successful
CICD Start / Sanity and Base Decision (pull_request) Successful in 15s
fix(ci): include root readme for backend uv sync
Stage README.md at /README.md during backend image dependency sync so hatchling metadata validation for ../README.md succeeds in deployable-image purity build step.
2026-06-20 10:44:06 -04:00

36 lines
869 B
Docker

# Backend Dockerfile for FastAPI with Python 3.14
FROM python:3.14-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
# Create and activate virtual environment
ENV VIRTUAL_ENV=/app/.venv
RUN uv venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Copy dependency files first for better caching
COPY backend/pyproject.toml backend/uv.lock* ./
# Hatchling metadata references ../README.md from backend/pyproject.toml.
COPY README.md /README.md
# Install dependencies
RUN uv sync --frozen
# Copy application code
COPY backend/ .
# Expose port
EXPOSE 8000
# Default command - can be overridden in compose for development
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]