saemref-supervisor.conf 1.51 KB
Newer Older
1
2
{% from "saemref/map.jinja" import saemref with context -%}
[program:saemref]
Philippe Pepiot's avatar
Philippe Pepiot committed
3
{% if saemref.instance.wsgi -%}
4
command=/home/{{ saemref.instance.user }}/venv/bin/gunicorn 'cubicweb.pyramid:wsgi_application()' --forwarded-allow-ips * --threads {{ saemref.instance.wsgi_threads }} --workers {{ saemref.instance.wsgi_workers }} --bind 0.0.0.0:{{ saemref.instance.port }}
Philippe Pepiot's avatar
Philippe Pepiot committed
5
{% else -%}
6
command=/home/{{ saemref.instance.user }}/venv/bin/cubicweb-ctl pyramid -D {{ saemref.instance.name }}
Philippe Pepiot's avatar
Philippe Pepiot committed
7
{% endif -%}
8
9
user={{ saemref.instance.user }}
redirect_stderr=true
10
stdout_logfile=/home/{{ saemref.instance.user }}/{{ saemref.instance.name }}.log
11
environment=CW_MODE=user,HOME=/home/{{ saemref.instance.user }},CW_INSTANCE={{ saemref.instance.name }}
12
13
autorestart=true
startsecs=10
14
15
16

[program:saemref-oai]
{% if saemref.instance.wsgi -%}
17
command=/home/{{ saemref.instance.user }}/venv/bin/gunicorn 'cubicweb.pyramid:wsgi_application()' --forwarded-allow-ips * --threads {{ saemref.instance.oai_threads }} --workers 1 --bind 0.0.0.0:{{ saemref.instance.oai_port }}
18
19
20
21
22
23
24
25
26
{% else -%}
command=/home/{{ saemref.instance.user }}/venv/bin/cubicweb-ctl pyramid -D {{ saemref.instance.name }}
{% endif -%}
environment=CW_MODE=user,HOME=/home/{{ saemref.instance.user }},CW_INSTANCE={{ saemref.instance.name }},CW_CONNECTIONS_POOL_SIZE={{ saemref.instance.oai_threads }},CW_PORT={{ saemref.instance.oai_port }}
user={{ saemref.instance.user }}
redirect_stderr=true
stdout_logfile=/home/{{ saemref.instance.user }}/{{ saemref.instance.name }}-oai.log
autorestart=true
startsecs=10