This repository has been archived on 2024-11-06. You can view files and clone it, but cannot push or open issues or pull requests.
python-api-server/Dockerfile
mg 47ab99f891 add web-ui (#2)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/python-api-server#2
2023-04-26 19:51:53 +02:00

28 lines
754 B
Docker

FROM ubuntu:focal
# deaktiviert Nachfragen beim installieren von Paketen
ENV DEBIAN_FRONTEND=noninteractive
# hadolint ignore=DL3008,DL3028,DL4006
RUN apt-get update && \
apt-get -y --no-install-recommends install \
python3-pip curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
WORKDIR /app
COPY templates/file_list.html ./templates/
COPY requirements.txt .
COPY app.py .
COPY gunicorn_config.py .
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"]