Running application on subpath #159
-
Hello.
When using nginx and uwgsi, I need to add a couple of lines to the uwsgi.ini config file, following hints from Flask uwsgi docs:
How can I achieve the same thing when using this Meinheld + Gunicorn image? Gunicorn docs briefly mentions that SCRIPT_NAME can be set in the environment for Gunicorn to pick up. meinheld-gunicorn-flask image does not provide SCRIPT_NAME as an environment variable to set (I tried it anyway), so the next thing I tried is adding this setting in the gunicorn_conf.py file. Following this issue comment for format, I added the following to
Not working. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thanks for the patience with my reply! Unfortunately, I'm not using this Docker image (nor Flask) for a very long time (I've been using FastAPI since I created it 😅 ). I didn't have to deal with this use case and unfortunately, I wouldn't be able to know what is the right way to solve it, as I also wouldn't be able to sit and debug it with your code myself. 😬 ☕ Something that might help in the debugging process is that |
Beta Was this translation helpful? Give feedback.
Thanks for the patience with my reply!
Unfortunately, I'm not using this Docker image (nor Flask) for a very long time (I've been using FastAPI since I created it 😅 ).
I didn't have to deal with this use case and unfortunately, I wouldn't be able to know what is the right way to solve it, as I also wouldn't be able to sit and debug it with your code myself. 😬 ☕
Something that might help in the debugging process is that
SCRIPT_NAME
is part of the WSGI standard in which Flask, Gunicorn, etc. are based on. You can read about it here: https://peps.python.org/pep-0333/#environ-variables