hi all, I'm looking into options for configuring m...
# pex
h
hi all, I'm looking into options for configuring my uwsgi python app to run with pex. I've found some ~5 year old discussions on the topic, many of which point back to https://github.com/kwlzn/pyuwsgi_pex. Does anyone have a uwsgi + pex setup that they recommend, or is working well for you?
f
it isn’t uwsgi but, here at Toolchain, our internal services are using gunicorn running from a pex (and fronted by nginx in a separate container in our Kubernetes pod)
h
gunicorn could be an option for me. It does look like it connects a bit smoother out of the box (no need to have a bootstrap.py, if I understand correctly)
f
we basically build an image with docker that contains the pex for the app and (since it is a Django app) has the static files extracted at a known path in the image
then the applicable helm chart has an init container that copies the static files into a volume that is shared with the nginx container
the main module for our startup is generic across our services and figures out what django configuration to use it and sets up gunicorn with it. I imagine in the less generic case, your main module for your pex would just call into gunicorn (or uswgi) to listen on a port known to whatever is fronting the server (e.g., nginx in our case)
but that setup code is really not pex-specific per se