Commit 9f9a0832 by Carson Gee

Move gitreload to use gunicorn configuration file

parent 5600334f
......@@ -23,6 +23,8 @@ GITRELOAD_HOSTS:
- github.com
GITRELOAD_NUM_THREADS: 1
GITRELOAD_NGINX_PORT: "18095"
GITRELOAD_GUNICORN_EXTRA: ""
GITRELOAD_GUNICORN_EXTRA_CONF: ""
gitreload_version: "master"
gitreload_dir: "{{ COMMON_APP_DIR }}/gitreload"
......
......@@ -23,6 +23,12 @@
sudo_user: "{{ gitreload_user }}"
notify: restart gitreload
- name: "add gunicorn configuration file"
template: >
src=edx/app/gitreload/gitreload_gunicorn.py.j2 dest={{ gitreload_dir }}/gitreload_gunicorn.py
sudo_user: "{{ gitreload_user }}"
notify: restart gitreload
- name: "writing supervisor script"
template: >
src=edx/app/supervisor/conf.available.d/gitreload.conf.j2 dest={{ supervisor_available_dir }}/gitreload.conf
......
"""
gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
{{ ansible_managed }}
"""
import multiprocessing
preload_app = True
timeout = 10
bind = "{{ gitreload_gunicorn_host }}:{{ gitreload_gunicorn_port }}"
workers = {{ gitreload_gunicorn_workers }}
{{ GITRELOAD_GUNICORN_EXTRA_CONF }}
......@@ -4,7 +4,7 @@ user={{ common_web_user }}
directory={{ gitreload_dir }}
umask=002
command={{ gitreload_venv }}/bin/gunicorn --preload -b {{ gitreload_gunicorn_host }}:{{ gitreload_gunicorn_port }} -w {{ gitreload_gunicorn_workers }} --timeout=10 gitreload.web:app
command={{ gitreload_venv }}/bin/gunicorn -c {{ gitreload_dir }}/gitreload_gunicorn.py {{ GITRELOAD_GUNICORN_EXTRA }} gitreload.web:app
environment=PID=/var/tmp/gitreload.pid
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
......
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