Env UWSGI_INCLUDE_FILE to include custom uwsgi. (#93)

pull/96/head
Chris McCormick 2019-08-23 00:40:00 +08:00 zatwierdzone przez Rui Carmo
rodzic 57a71474bd
commit 7d4e7e2cb7
2 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -29,6 +29,7 @@ You can configure deployment settings by placing special variables in an `ENV` f
* `UWSGI_LOG_X_FORWARDED_FOR` (boolean): set the `log-x-forwarded-for` option.
* `UWSGI_GEVENT`: enable the Python 2 `gevent` plugin
* `UWSGI_ASYNCIO`: enable the Python 2/3 `asyncio` plugin
* `UWSGI_INCLUDE_FILE`: a uwsgi config file in the app's dir to include - useful for including custom uwsgi directives.
## Nginx Settings

Wyświetl plik

@ -858,7 +858,10 @@ def spawn_worker(app, kind, command, env, ordinal=1):
for k in ['NGINX_ACL']:
if k in env:
del env[k]
# insert user defined uwsgi settings if set
settings += parse_settings(join(APP_ROOT, app, env.get("UWSGI_INCLUDE_FILE"))).items() if env.get("UWSGI_INCLUDE_FILE") else []
for k, v in env.items():
settings.append(('env', '{k:s}={v}'.format(**locals())))