The linked waitress docs do work. I deploy waitress behind nginx and envoy and 
heroku regularly using the guides in there. Make sure to configure the trusted 
proxy settings and ensure the upstream is setting the right headers. 

- Michael

> On Dec 13, 2021, at 18:22, Jens Troeger <[email protected]> wrote:
> 
> Hello,
> 
> I’ve seen some conversation here about running a Pyramid app server inside a 
> Docker container, but none has really answered my questions.
> 
> My setup is that nginx runs on the host and currently uses proxy_pass to 
> forward requests to the container’s external port, so that the requests are 
> then processed and responded to by the Pyramid application running inside the 
> container.
> 
> Question: Inside the container I’m running the Pyramid application using 
> pserve which listens on the container’s mapped internal port. Should I switch 
> to gunicorn instead? Does it matter in such a setup?
> 
> The proxy_pass URL is http://127.0.0.1:6543 which means that the external 
> https gets lost. That, in turn, means that within the Pyramid app (inside of 
> the container) calls to e.g. static_url() return a http route instead of the 
> necessary & expected https.
> 
> Question: I currently use prefix WSGI middleware to rewrite responses 
> (discussion) but that feels hacky. Unfortunately, I wasn’t able to make 
> X-Forward-Proto HTTP header work quite yet so what’s the current 
> recommendation here? Is the Using Behind a Reverse Proxy page current and 
> working?
> 
> Question: Are there any benefits to using a UNIX socket for proxy_pass, 
> instead of HTTP?
> 
> Much thanks in advance!
> Jens
> -- 
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pylons-discuss/508f077e-ff7e-47c4-9e8f-ee5f018e9a7en%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/5B6A51E7-2449-47BB-805F-E0ED8B58050D%40gmail.com.

Reply via email to