Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
Also listen on any interface to ensure docker connectivity instead of localhost
  • Loading branch information
Mad Mike committed Jul 9, 2020
1 parent 1b9b279 commit 62b71b4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Dockerfile
@@ -0,0 +1,14 @@
FROM tiangolo/uwsgi-nginx-flask:python3.6-alpine3.7

ENV STATIC_URL /static
ENV STATIC_PATH /var/www/app/static

COPY ./requirements.txt /var/www/requirements.txt

COPY . /app
RUN pip install -r /var/www/requirements.txt

EXPOSE 8080

ENTRYPOINT [ "python" ]
CMD [ "/app/server.py" ]
2 changes: 1 addition & 1 deletion server.py
Expand Up @@ -103,7 +103,7 @@ def add_header(r):
return r

if __name__ == '__main__':
ip = '127.0.0.1'
ip = '0.0.0.0'
port = 8080
print("Site starting on http://" + ip + ":" + str(port))
app.run(host=ip, port=port)

0 comments on commit 62b71b4

Please sign in to comment.