You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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,
Felipe
flask_nginx_test.zip
The text was updated successfully, but these errors were encountered: