From 11d13ae0ef60299e8ae6673ebdf27988e0f972ab Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Tue, 31 Oct 2023 09:11:54 -0400 Subject: [PATCH 1/6] dockerized --- Dockerfile | 7 +++++++ index.html => app/index.html | 0 index.py => app/index.py | 0 portable.py => app/portable.py | 0 requirements.txt => app/requirements.txt | 0 {screenshots => app/screenshots}/step-1.png | Bin {screenshots => app/screenshots}/step-2.png | Bin {screenshots => app/screenshots}/step-3.png | Bin {screenshots => app/screenshots}/step-4.gif | Bin docker-compose.yaml | 7 +++++++ 10 files changed, 14 insertions(+) create mode 100644 Dockerfile rename index.html => app/index.html (100%) rename index.py => app/index.py (100%) rename portable.py => app/portable.py (100%) rename requirements.txt => app/requirements.txt (100%) rename {screenshots => app/screenshots}/step-1.png (100%) rename {screenshots => app/screenshots}/step-2.png (100%) rename {screenshots => app/screenshots}/step-3.png (100%) rename {screenshots => app/screenshots}/step-4.gif (100%) create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e2a5f2f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:alpine3.7 +COPY /app /app +WORKDIR /app +RUN pip install -r requirements.txt +EXPOSE 5001 +ENTRYPOINT [ "python" ] +CMD [ "portable.py" ] \ No newline at end of file diff --git a/index.html b/app/index.html similarity index 100% rename from index.html rename to app/index.html diff --git a/index.py b/app/index.py similarity index 100% rename from index.py rename to app/index.py diff --git a/portable.py b/app/portable.py similarity index 100% rename from portable.py rename to app/portable.py diff --git a/requirements.txt b/app/requirements.txt similarity index 100% rename from requirements.txt rename to app/requirements.txt diff --git a/screenshots/step-1.png b/app/screenshots/step-1.png similarity index 100% rename from screenshots/step-1.png rename to app/screenshots/step-1.png diff --git a/screenshots/step-2.png b/app/screenshots/step-2.png similarity index 100% rename from screenshots/step-2.png rename to app/screenshots/step-2.png diff --git a/screenshots/step-3.png b/app/screenshots/step-3.png similarity index 100% rename from screenshots/step-3.png rename to app/screenshots/step-3.png diff --git a/screenshots/step-4.gif b/app/screenshots/step-4.gif similarity index 100% rename from screenshots/step-4.gif rename to app/screenshots/step-4.gif diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..799a2a8 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,7 @@ +version: '3' +services: + 13ft: + build: . + #image: your-image-name:tag + ports: + - "5000:5000" \ No newline at end of file From 0ad0e3e341e4924fbdaf8655c4c5c185fc79d8e2 Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Tue, 31 Oct 2023 09:16:14 -0400 Subject: [PATCH 2/6] Update requirements.txt forgot to readd requests to requirements file --- app/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/requirements.txt b/app/requirements.txt index 7e10602..5eaf725 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -1 +1,2 @@ flask +requests \ No newline at end of file From 32cde2f385485bf91ede3169533151ef2f2e7e1e Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Tue, 31 Oct 2023 09:25:14 -0400 Subject: [PATCH 3/6] Update portable.py listen on all interfaces --- app/portable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/portable.py b/app/portable.py index 9f84c4b..ec7c0e8 100644 --- a/app/portable.py +++ b/app/portable.py @@ -130,4 +130,4 @@ def get_article(path): return "Invalid URL", 400 -app.run(debug=False) +app.run(host='0.0.0.0', port=5001, debug=False) From 0652e13434f6695deafa917d705a85eb18adddc2 Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Tue, 31 Oct 2023 09:26:21 -0400 Subject: [PATCH 4/6] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e2a5f2f..20d3c1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:alpine3.7 +FROM python:3.9.18-alpine COPY /app /app WORKDIR /app RUN pip install -r requirements.txt From 69544ada63dd99d78970d7ebb115f4b77def313e Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Tue, 31 Oct 2023 09:28:13 -0400 Subject: [PATCH 5/6] Update portable.py --- app/portable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/portable.py b/app/portable.py index ec7c0e8..a71454b 100644 --- a/app/portable.py +++ b/app/portable.py @@ -130,4 +130,4 @@ def get_article(path): return "Invalid URL", 400 -app.run(host='0.0.0.0', port=5001, debug=False) +app.run(host='0.0.0.0', port=5000, debug=False) From 006374c732cab1d255b6f227dab55536a3fd5550 Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Tue, 31 Oct 2023 09:30:13 -0400 Subject: [PATCH 6/6] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 20d3c1f..9cd6cfe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,6 @@ FROM python:3.9.18-alpine COPY /app /app WORKDIR /app RUN pip install -r requirements.txt -EXPOSE 5001 +EXPOSE 5000 ENTRYPOINT [ "python" ] CMD [ "portable.py" ] \ No newline at end of file