From 0ef8ad597fd5620674be78f2e34d37f7c797a648 Mon Sep 17 00:00:00 2001 From: Andrew Simonson Date: Sun, 29 Jan 2023 13:25:00 -0600 Subject: [PATCH] sick to my stomach --- Dockerfile | 3 --- flask.conf | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) 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; + }