Files
data-entry-app/backend/Dockerfile
T

26 lines
777 B
Docker
Raw Normal View History

2026-04-29 23:53:51 +12:00
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
2026-05-10 09:46:07 +12:00
RUN addgroup --system app && adduser --system --ingroup app app
2026-04-29 23:53:51 +12:00
COPY backend /app
2026-05-31 20:19:44 +12:00
COPY ["input_data/1.xlsx", "/app/input_data/1.xlsx"]
2026-06-02 15:41:53 +12:00
COPY ["input_data/Operations Throughput.xlsx", "/app/input_data/Operations Throughput.xlsx"]
2026-05-31 20:19:44 +12:00
COPY ["Input Cost Spreadsheet(1).xlsx", "/app/Input Cost Spreadsheet(1).xlsx"]
2026-04-29 23:53:51 +12:00
RUN pip install --no-cache-dir --upgrade pip && \
2026-05-10 09:46:07 +12:00
pip install --no-cache-dir . && \
chown -R app:app /app
USER app
2026-04-29 23:53:51 +12:00
EXPOSE 8000
2026-05-10 09:46:07 +12:00
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=5 CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health')"
2026-04-29 23:53:51 +12:00
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]