diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1c2b579 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +media +README.md \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ed8ebf5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2e93279 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.7.10 + +WORKDIR /build/ + +COPY requirements.txt /build/ + +RUN pip install --upgrade pip +RUN pip install -r requirements.txt + +COPY . /build/ + +# CMD ["python3", "-m", "flask", "run", "--host=0.0.0.0"] \ No newline at end of file diff --git a/app.py b/app.py index 684ca97..b97e7d8 100644 --- a/app.py +++ b/app.py @@ -26,4 +26,4 @@ def viewer_page(cid): if __name__ == "__main__": - app.run(debug=True) + app.run(host="0.0.0.0", port=80) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cdbb7e8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: "3" +services: + app: + build: + context: . + dockerfile: Dockerfile + ports: + - "80:5000" + network_mode: "host" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 4b70123..3c767be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ Flask==2.2.5 +requests==2.31.0 diff --git a/templates/index.html b/templates/index.html index 1482061..c2dc018 100644 --- a/templates/index.html +++ b/templates/index.html @@ -24,7 +24,7 @@

Open source project

This project is fully opened, so you can contribute in it if you want

- +