Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run HTTPS using waitress? #272

Closed
fciamponi opened this issue Feb 17, 2022 · 0 comments
Closed

How to run HTTPS using waitress? #272

fciamponi opened this issue Feb 17, 2022 · 0 comments

Comments

@fciamponi
Copy link

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

Repository owner locked and limited conversation to collaborators Aug 29, 2024
@tiangolo tiangolo converted this issue into discussion #377 Aug 29, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant