added some more detail for setting up gunicorn on systemd

This commit is contained in:
David McInnis 2016-05-12 00:33:39 -07:00
parent 081f8eec08
commit 35f9e3e77c

View File

@ -213,7 +213,7 @@ are configurations files to set the Gunicorn launch in systemd and
the interfaces on which Gunicorn will listen. The sockets will be managed by the interfaces on which Gunicorn will listen. The sockets will be managed by
systemd: systemd:
**gunicorn.service**:: **/etc/systemd/system/gunicorn.service**::
[Unit] [Unit]
Description=gunicorn daemon Description=gunicorn daemon
@ -233,7 +233,7 @@ systemd:
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
**gunicorn.socket**:: **/etc/systemd/system/gunicorn.socket**::
[Unit] [Unit]
Description=gunicorn socket Description=gunicorn socket
@ -246,10 +246,21 @@ systemd:
[Install] [Install]
WantedBy=sockets.target WantedBy=sockets.target
**tmpfiles.d/gunicorn.conf**:: **/usr/lib/tmpfiles.d/gunicorn.conf**::
d /run/gunicorn 0755 someuser someuser - d /run/gunicorn 0755 someuser someuser -
Next enable the services so they autostart at boot::
systemctl enable nginx.service
systemctl enable gunicorn.socket
Either reboot, or start the services manually::
systemctl start nginx.service
systemctl start gunicorn.service
After running ``curl http://localhost:9000/``, Gunicorn should start and you After running ``curl http://localhost:9000/``, Gunicorn should start and you
should see something like that in logs:: should see something like that in logs::