From 35f9e3e77c4d212f40cd4d39776b56ca3db2b01a Mon Sep 17 00:00:00 2001 From: David McInnis Date: Thu, 12 May 2016 00:33:39 -0700 Subject: [PATCH 1/2] added some more detail for setting up gunicorn on systemd --- docs/source/deploy.rst | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/source/deploy.rst b/docs/source/deploy.rst index 9e3f22d0..ffcdc0d2 100644 --- a/docs/source/deploy.rst +++ b/docs/source/deploy.rst @@ -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 systemd: -**gunicorn.service**:: +**/etc/systemd/system/gunicorn.service**:: [Unit] Description=gunicorn daemon @@ -233,7 +233,7 @@ systemd: [Install] WantedBy=multi-user.target -**gunicorn.socket**:: +**/etc/systemd/system/gunicorn.socket**:: [Unit] Description=gunicorn socket @@ -246,10 +246,21 @@ systemd: [Install] WantedBy=sockets.target -**tmpfiles.d/gunicorn.conf**:: +**/usr/lib/tmpfiles.d/gunicorn.conf**:: 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 should see something like that in logs:: From d27bf966907a1edf5e50b6fce7643f1f647ca425 Mon Sep 17 00:00:00 2001 From: David McInnis Date: Thu, 12 May 2016 11:52:27 -0700 Subject: [PATCH 2/2] fixed typo where we start the wrong service --- docs/source/deploy.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/deploy.rst b/docs/source/deploy.rst index ffcdc0d2..d9ce7a01 100644 --- a/docs/source/deploy.rst +++ b/docs/source/deploy.rst @@ -258,7 +258,7 @@ Next enable the services so they autostart at boot:: Either reboot, or start the services manually:: systemctl start nginx.service - systemctl start gunicorn.service + systemctl start gunicorn.socket After running ``curl http://localhost:9000/``, Gunicorn should start and you