From b42a5d333d62d806d6ebff95fc51e4036fc981e0 Mon Sep 17 00:00:00 2001 From: flifloo Date: Sat, 10 Jul 2021 16:38:58 +0200 Subject: [PATCH] Add docker image --- Dockerfile | 10 ++++++++++ app.py => src/app.py | 0 requirements.txt => src/requirements.txt | 0 3 files changed, 10 insertions(+) create mode 100644 Dockerfile rename app.py => src/app.py (100%) rename requirements.txt => src/requirements.txt (100%) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..602d11f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.9-alpine +RUN mkdir /duplicati_exporter +RUN apk add --no-cache --virtual .build-deps alpine-sdk linux-headers +COPY ./src /duplicati_exporter +RUN cd /duplicati_exporter && pip install --no-cache-dir -r requirements.txt +RUN apk del .build-deps +EXPOSE 5000 +ENV FLASK_RUN_HOST=0.0.0.0 +ENV FLASK_ENV=production +CMD cd /duplicati_exporter && python -m flask run diff --git a/app.py b/src/app.py similarity index 100% rename from app.py rename to src/app.py diff --git a/requirements.txt b/src/requirements.txt similarity index 100% rename from requirements.txt rename to src/requirements.txt