diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4163cb8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.5 + +COPY . . + +RUN pip install --upgrade pip +RUN pip install -r requirements.txt + +ENV FLASK_APP=server + +EXPOSE 5000 + +CMD flask run --host=0.0.0.0 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d148d17 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +build: + docker build -t 1pt-co . +run: + docker run -dp 5000:5000 1pt-co diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4e2bc50 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +flask +requests +pytz +gspread +oauth2client +pysafebrowsing +validators diff --git a/server.py b/server.py index c8bc3c5..50beab1 100644 --- a/server.py +++ b/server.py @@ -68,4 +68,5 @@ def catch_all(u_path): response.headers['Access-Control-Allow-Origin'] = '*' return response -app.run(host='0.0.0.0') +if __name__ == '__main__': + app.run(host='0.0.0.0')