22 lines
609 B
Docker
22 lines
609 B
Docker
|
|
FROM python:3.12-slim
|
||
|
|
|
||
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||
|
|
curl && rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
COPY requirements.txt /tmp/requirements.txt
|
||
|
|
RUN pip install --no-cache-dir -r /tmp/requirements.txt && rm /tmp/requirements.txt
|
||
|
|
|
||
|
|
WORKDIR /app
|
||
|
|
COPY app/ /app/app/
|
||
|
|
|
||
|
|
RUN mkdir -p /data/outputs /data/temp
|
||
|
|
|
||
|
|
VOLUME ["/data/outputs", "/data/temp"]
|
||
|
|
|
||
|
|
EXPOSE 8000
|
||
|
|
|
||
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||
|
|
CMD curl -f http://localhost:8000/api/v1/health || exit 1
|
||
|
|
|
||
|
|
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|