This commit is contained in:
2023-07-25 20:51:15 +02:00
commit 270da5f92b
4 changed files with 107 additions and 0 deletions

15
Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
RUN adduser -u 5678 --disabled-password --gecos "" appuser
WORKDIR /app
COPY requirements.txt .
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=appuser:appuser *.py .
COPY --chown=appuser:appuser invTypeMaterials.csv .
USER appuser
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]