example configurations.

This commit is contained in:
Stefan Midjich 2016-04-18 21:42:29 +02:00
parent 6be2426f09
commit af016709f4
4 changed files with 58 additions and 1 deletions

View file

@ -0,0 +1,17 @@
server {
listen {{webportal_ip}}:80 default_server;
server_name _;
location / {
# Must fix the HTTP_X_FORWARDED_FOR value in WSGI environ.
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
if (!-f $request_filename) {
proxy_pass http://127.0.0.1:8080;
break;
}
}
}

View file

@ -0,0 +1,14 @@
[program:captiveportal]
command={{global_virtualenv_path}}/bin/gunicorn portal --workers 3 --log-level DEBUG --bind 127.0.0.1:8080
directory=/var/opt/captiveportal/portal
pythonpath={{global_virtualenv_path}}/lib/python2.7/site-packages
user={{captiveportal_username}}
group=virtualenv
umask=002
autostart=true
autorestart=true
stdout_logfile=/var/log/captiveportal_gunicorn.log
loglevel=debug
redirect_stderr=true
stopsignal=QUIT
environment=PATH={{global_virtualenv_path}}/bin:/bin:/sbin:/usr/bin:/usr/sbin

View file

@ -0,0 +1,20 @@
[program:rqworker]
; Also, you probably want to include a settings module to configure this
; worker. For more info on that, see http://python-rq.org/docs/workers/
command={{global_virtualenv_path}}/bin/rq worker -u redis://127.0.0.1:6379/
process_name=%(program_name)s
numprocs=1
; This is the directory from which RQ is ran. Be sure to point this to the
; directory where your source code is importable from
directory={{captiveportal_install_dir}}/portal
; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die
; within 10 seconds, supervisor will forcefully kill it
stopsignal=TERM
autostart=true
autorestart=true
stdout_logfile=/var/log/rqworker_gunicorn.log
environment=PATH={{global_virtualenv_path}}/bin:/bin:/sbin:/usr/bin:/usr/sbin