26 lines
566 B
Docker
26 lines
566 B
Docker
# syntax=docker/dockerfile:1
|
|
FROM python:3.13-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_NO_CACHE_DIR=1 \
|
|
PORT=8000
|
|
|
|
WORKDIR /app
|
|
|
|
# System deps (optional, kept minimal)
|
|
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Python deps first for better caching
|
|
COPY requirements.txt /app/requirements.txt
|
|
RUN pip install -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . /app
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-8000}"]
|
|
|