diff options
| author | Michael Grote | 2023-04-14 12:17:08 +0200 |
|---|---|---|
| committer | Michael Grote | 2023-04-14 12:17:08 +0200 |
| commit | b91cf9fc508a6358ff47a49c11d3cce36bda5432 (patch) | |
| tree | 128d4e17736992f3d4d00da74936ba0f86b049d1 /Dockerfile | |
| parent | 2caf356288366a8003dd8e4ba4c2339a9a370653 (diff) | |
add healthcheck
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive # hadolint ignore=DL3008,DL3028,DL4006 RUN apt-get update && \ apt-get -y --no-install-recommends install \ - python3-pip && \ + python3-pip curl && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/* @@ -20,6 +20,8 @@ RUN pip install --no-cache-dir -r requirements.txt EXPOSE 5000 +HEALTHCHECK --interval=5s --timeout=3s \ + CMD curl -f http://localhost:5000/health || exit 1 #CMD [ "python3", "-m" , "flask", "run", "--port", "5000", "--host", "0.0.0.0"] CMD [ "python3", "-m" , "gunicorn", "app:app", "-c", "gunicorn_config.py"] |