diff --git a/Dockerfile b/Dockerfile index e2b28a6..a9a6b50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,3 @@ -# nginx-gunicorn-flask - FROM ubuntu:lunar LABEL maintainer="Andrew Simonson " @@ -7,7 +5,6 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get install -y python3-pip nginx gunicorn supervisor -# do we really need venv? # Setup flask application RUN mkdir -p /deploy/app diff --git a/flask.conf b/flask.conf index 449eab3..393c53f 100644 --- a/flask.conf +++ b/flask.conf @@ -1,9 +1,14 @@ server { listen 8080; + server_name _; location / { proxy_pass http://localhost:5000/; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } + path https://$server_name$request_uri; + + return 301 https://$host$request_uri; + }