Add support for adding environment variables
This commit is contained in:
parent
48ec3aead6
commit
9adc044f1a
|
@ -69,6 +69,9 @@ into sections and described below:
|
||||||
- app_uwsgi_executable:
|
- app_uwsgi_executable:
|
||||||
- The method executed by UWSGI to create a WSGI running app. Usually a WSGI factory method or module in the app.
|
- The method executed by UWSGI to create a WSGI running app. Usually a WSGI factory method or module in the app.
|
||||||
- Default: app:make_wsgi_app()
|
- Default: app:make_wsgi_app()
|
||||||
|
- app_uwsgi_envs:
|
||||||
|
- (Optional) A dictionary of environment variables to pass into an app.
|
||||||
|
- Default: empty dictionary
|
||||||
|
|
||||||
### General Web:
|
### General Web:
|
||||||
|
|
||||||
|
|
|
@ -15,3 +15,4 @@ app_nginx_static_path: "{{ app_root_path }}/{{ app_name }}/static/"
|
||||||
# UWSGI
|
# UWSGI
|
||||||
app_uwsgi_port: 8000
|
app_uwsgi_port: 8000
|
||||||
app_uwsgi_executable: "app:make_wsgi_app()"
|
app_uwsgi_executable: "app:make_wsgi_app()"
|
||||||
|
app_uwsgi_envs: {}
|
||||||
|
|
|
@ -6,3 +6,7 @@ processes = 8
|
||||||
chdir = {{ app_root_path }}
|
chdir = {{ app_root_path }}
|
||||||
virtualenv = {{ app_venv }}
|
virtualenv = {{ app_venv }}
|
||||||
module = {{ app_uwsgi_executable }}
|
module = {{ app_uwsgi_executable }}
|
||||||
|
|
||||||
|
{% for env_var, env_value in app_uwsgi_envs.items() %}
|
||||||
|
env = {{ env_var | upper }}={{ env_value }}
|
||||||
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue