From 991d641a3776ad811de668f632deb4c97d6d4728 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Mon, 28 Mar 2022 18:50:42 -0300 Subject: [PATCH] Add Dockerfile deployment --- Dockerfile | 17 +++++++++++++++++ requirements.txt | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..befd9e6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM debian + +ENV APP_PATH=/app +COPY . $APP_PATH + +RUN apt-get update +RUN apt-get upgrade -y +RUN apt-get install -y python3.9 python3.9-venv + +ENV VIRTUAL_ENV=$APP_PATH/venv +RUN python3.9 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" + +WORKDIR $APP_PATH +RUN pip install -r requirements.txt + +CMD ["gunicorn", "index:app", "-b", "0.0.0.0:5000"] diff --git a/requirements.txt b/requirements.txt index b113dcf..803e5da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ -flask==2.0.2 +flask==2.1.0 markdown2==2.4.2 +gunicorn==20.1.0