add docs for systemd+nginx+gunicorn

This commit is contained in:
tim@bastelfreak.de
2014-12-06 20:34:58 +01:00
committed by Your Name
parent 9f5450789d
commit 43be944fd9

View File

@@ -222,7 +222,7 @@ scenarios:
* Apache + mod_wsgi * Apache + mod_wsgi
* Apache + mod_passenger * Apache + mod_passenger
* uwsgi + nginx * nginx + uwsgi
* nginx + gunicorn * nginx + gunicorn
If you deploy Puppetboard through a different setup we'd welcome a pull If you deploy Puppetboard through a different setup we'd welcome a pull
@@ -512,6 +512,33 @@ As we may want to serve in the background, and we need ``PUPPETBOARD_SETTINGS``
stderr_logfile=/var/log/supervisor/puppetboard/puppetboard.err stderr_logfile=/var/log/supervisor/puppetboard/puppetboard.err
environment=PUPPETBOARD_SETTINGS="/var/www/puppetboard/settings.py" environment=PUPPETBOARD_SETTINGS="/var/www/puppetboard/settings.py"
For newer systems with systemd (for example CentOS7), you can use the following service file (``/usr/lib/systemd/system/gunicorn@.service``):
.. code-block:: ini
[Unit]
Description=gunicorn daemon for %i
After=network.target
[Service]
ExecStart=/usr/bin/gunicorn --config /etc/sysconfig/gunicorn/%i.conf %i
ExecReload=/bin/kill -s HUP $MAINPID
PrivateTmp=true
User=gunicorn
Group=gunicorn
And the corresponding gunicorn config (``/etc/sysconfig/gunicorn/puppetboard.app\:app.conf``):
.. code-block:: ini
import multiprocessing
bind = '127.0.0.1:9090'
workers = multiprocessing.cpu_count() * 2 + 1
chdir = '/usr/lib/python2.7/site-packages/puppetboard'
raw_env = ['PUPPETBOARD_SETTINGS=/var/www/puppetboard/settings.py', 'http_proxy=']
Security Security
-------- --------