Files
myfileagent-pipeline/secure-delivery/v1/Dockerfile
T
nkogut 746b42b72b
myfileagent-python-ci/pipeline/pr-main This commit looks good
myfileagent-python-ci/pipeline/head This commit looks good
Allow staging health checks more time under load
2026-11-07 22:28:21 +00:00

13 lines
693 B
Docker

FROM python:3.13-alpine@sha256:7984cf56ceaddebe4fefeb75d64000b9f45d8b77b11a09b24524da6cdc3af0c8
ARG APP_COMMIT=development
ENV APP_COMMIT=$APP_COMMIT PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN python -m pip uninstall -y pip && rm -rf /usr/local/lib/python3.13/ensurepip/_bundled
COPY app.py .
USER 10001:10001
EXPOSE 8000
HEALTHCHECK --interval=10s --timeout=10s --start-period=10s --retries=3 CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=8)"
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "1", "--worker-tmp-dir", "/tmp", "app:app"]