From 96d746cb297993c55a59b802833de599053d73b8 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 11 Nov 2019 22:36:08 +0100 Subject: [PATCH] added docker config and requirements.txt --- Dockerfile | 15 +++++++++++++++ app.py | 2 +- docker-compose.yml | 9 +++++++++ requirements.txt | 3 +++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7aa4d26 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.6 + +WORKDIR /usr/src/app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY app.py . +COPY app.conf . +COPY views ./views +COPY static ./static + +EXPOSE 8000/tcp + +CMD [ "python", "./app.py" ] diff --git a/app.py b/app.py index 6038fd9..842ff36 100644 --- a/app.py +++ b/app.py @@ -339,4 +339,4 @@ def delete_account(): #run(host='localhost', port=8000, debug=True, reloader=True) # run prod server -run(host='localhost', port=8000) +run(host='0.0.0.0', port=8000, debug=True) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2a1048a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: "3" +services: + accounts: + build: . + image: accounts:latest + container_name: accounts + ports: + - 8734:8000 + restart: unless-stopped diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4c5c4c9 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +requests +configparser +bottle