22 lines
661 B
Docker
22 lines
661 B
Docker
FROM python:3.12-slim AS base
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
|
|
WORKDIR /app
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY . .
|
|
RUN mkdir -p /app/data
|
|
EXPOSE 8000
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
# Development image: base plus dev dependencies. Used by docker-compose.dev.yml,
|
|
# which supplies the reload command and per-service environment.
|
|
FROM base AS dev
|
|
|
|
COPY requirements-dev.txt ./
|
|
RUN pip install --no-cache-dir -r requirements-dev.txt
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|