-
Hello @tiangolo , Great work with this docker image, it's been a great help in getting part of my PhD up and running. Right now, I'm trying to create a simple Flask API that takes static html files from a folder and returns them to the user. For several reasons, at this stage I need both my frontend and backend running on a single container with waitress serving the flask app. I've managed to get it up and running using the API and Dockerfile in annex, and it successfully runs the app and returns the pages... however, it only works in HTTP when I use a virtual proxy, and I need them to be able to access via HTTPS only (it returns 500 Internal Server Error nginx/1.21.0 when using https requests). Is there a way to incorporate HTTPS-only access to my build? The commands I'm using to build and run (host address and email omitted for safety) my docker container are: docker build -t test_uwsgi_nginx_flask . docker run -dit -e "VIRTUAL_HOST=<my_address>" -e "LETSENCRYPT_HOST=<my_address>" -e "LETSENCRYPT_E MAIL=<my_email>" --name test_nginx_flask --restart always -p 8888:80 test_uwsgi_nginx_flask:latest Thanks in advance for any assistance you can provide. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'm actually not sure what is waitress... 😅 but anyway, I would recommend you handle HTTPS outside, for example with Traefik, and then in this container handle only plain HTTP. |
Beta Was this translation helpful? Give feedback.
I'm actually not sure what is waitress... 😅 but anyway, I would recommend you handle HTTPS outside, for example with Traefik, and then in this container handle only plain HTTP.