20 lines
556 B
Docker
20 lines
556 B
Docker
FROM python:3.13-slim
|
|
|
|
# Install curl for healthcheck
|
|
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install uv for fast dependency management
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy dependency files first for layer caching
|
|
COPY requirements.txt .
|
|
RUN uv pip install --system --no-cache -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Default: run FastAPI server
|
|
EXPOSE 8000
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|