Commit 6a4e586f by Carson Gee

Convert ora gunicorn to configuration file

parent ad926fc7
......@@ -2,6 +2,7 @@
---
ORA_NGINX_PORT: 18060
ORA_GUNICORN_EXTRA: ""
ORA_GUNICORN_EXTRA_CONF: ""
ora_app_dir: "{{ COMMON_APP_DIR }}/ora"
ora_code_dir: "{{ ora_app_dir }}/ora"
......
......@@ -19,6 +19,13 @@
with_items: ['ora', 'ora_celery']
when: not disable_edx_services
- name: "add gunicorn configuration file"
template: >
src=ora_gunicorn.py.j2 dest={{ ora_app_dir }}/ora_gunicorn.py
sudo_user: "{{ ora_user }}"
notify:
- restart ora
- include: ease.yml
- name: create ora application config
......
[program:ora]
command={{ ora_venv_bin }}/gunicorn --preload -b {{ ora_gunicorn_host }}:{{ ora_gunicorn_port }} -w {{ ora_gunicorn_workers }} --timeout=90 --pythonpath={{ ora_code_dir}} {{ ORA_GUNICORN_EXTRA }} edx_ora.wsgi
command={{ ora_venv_bin }}/gunicorn -c {{ ora_app_dir }}/ora_gunicorn.py {{ ORA_GUNICORN_EXTRA }} edx_ora.wsgi
user={{ common_web_user }}
directory={{ ora_code_dir }}
......
"""
gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
{{ ansible_managed }}
"""
preload_app = True
timeout = 90
bind = "{{ ora_gunicorn_host }}:{{ ora_gunicorn_port }}"
pythonpath = "{{ ora_code_dir }}"
workers = {{ ora_gunicorn_workers }}
{{ ORA_GUNICORN_EXTRA_CONF }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment