21 lines
463 B
Docker
21 lines
463 B
Docker
# syntax=docker/dockerfile:1
|
|
FROM python:3.13
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy dependency list and install first (leverages Docker layer cache)
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY app ./app
|
|
|
|
EXPOSE 8000
|
|
|
|
# Run the FastAPI app with Uvicorn
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|