Commit ad926fc7 by Carson Gee

Convert xserver gunicorn to configuration file

parent 2b556f2b
......@@ -4,6 +4,7 @@
XSERVER_NGINX_PORT: 18050
XSERVER_GUNICORN_EXTRA: ""
XSERVER_GUNICORN_EXTRA_CONF: ""
XSERVER_RUN_URL: ''
XSERVER_LOGGING_ENV: 'sandbox'
XSERVER_SYSLOG_SERVER: ''
......
......@@ -11,6 +11,13 @@
state=link force=yes
when: not disable_edx_services
- name: "add gunicorn configuration file"
template: >
src=xserver_gunicorn.py.j2 dest={{ xserver_app_dir }}/xserver_gunicorn.py
sudo_user: "{{ xserver_user }}"
notify:
- restart xserver
- name: checkout code
git: >
dest={{ xserver_code_dir }} repo={{ xserver_source_repo }} version={{xserver_version}}
......
[program:xserver]
command={{ xserver_venv_bin }}/gunicorn --preload -b {{ xserver_gunicorn_host }}:{{ xserver_gunicorn_port }} -w {{ xserver_gunicorn_workers }} --timeout=30 --pythonpath={{ xserver_code_dir }} {{ XSERVER_GUNICORN_EXTRA }} pyxserver_wsgi:application
command={{ xserver_venv_bin }}/gunicorn -c {{ xserver_app_dir }}/xserver_gunicorn.py {{ XSERVER_GUNICORN_EXTRA }} pyxserver_wsgi:application
user={{ common_web_user }}
directory={{ xserver_code_dir }}
......
"""
gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
{{ ansible_managed }}
"""
preload_app = True
timeout = 30
bind = "{{ xserver_gunicorn_host }}:{{ xserver_gunicorn_port }}"
pythonpath = "{{ xserver_code_dir }}"
workers = {{ xserver_gunicorn_workers }}
{{ XSERVER_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