From eb651ef702e6b6ec3cc60a71294c815dbf133213 Mon Sep 17 00:00:00 2001 From: drops Date: Sat, 26 Oct 2024 20:51:35 +0200 Subject: [PATCH 1/4] change listen network to 0.0.0.0 to work behind docker proxy --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index e6b57e7..decc5da 100644 --- a/app.py +++ b/app.py @@ -418,4 +418,4 @@ def calculate_distance_shootoff(desired_wall_length, size, target_count): return distance if __name__ == '__main__': - app.run(debug=True) + app.run(host='0.0.0.0') From 909671e32d24eeb2cdd613f2baab4efe8aae05d1 Mon Sep 17 00:00:00 2001 From: drops Date: Sat, 26 Oct 2024 20:53:07 +0200 Subject: [PATCH 2/4] add flask-babel and fix flask version dependencies --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ce2396f..e25ccad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,10 @@ +Flask-Babel==2.0.0 blinker==1.8.2 Brotli==1.1.0 cffi==1.17.0 click==8.1.7 cssselect2==0.7.0 -Flask==3.0.3 +Flask==2.3.3 fonttools==4.53.1 html5lib==1.1 itsdangerous==2.2.0 From 4be515d18e283f9771a710da8dcf9771eee7a4a1 Mon Sep 17 00:00:00 2001 From: drops Date: Sat, 26 Oct 2024 20:54:47 +0200 Subject: [PATCH 3/4] add Dockerfile --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7eab2dd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.10-alpine +COPY ./requirements.txt /app/requirements.txt +WORKDIR /app +RUN apk add pango libffi fontconfig ttf-freefont +RUN pip install -r requirements.txt +COPY . /app +ENTRYPOINT [ "python" ] +CMD [ "app.py" ] From 325d90b9f6fb0def945124bc3f8c0b3b59103c06 Mon Sep 17 00:00:00 2001 From: drops Date: Sat, 26 Oct 2024 21:25:52 +0200 Subject: [PATCH 4/4] add EXPOSE 5000 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 7eab2dd..d6d1f92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,6 @@ WORKDIR /app RUN apk add pango libffi fontconfig ttf-freefont RUN pip install -r requirements.txt COPY . /app +EXPOSE 5000 ENTRYPOINT [ "python" ] CMD [ "app.py" ]