diff --git a/docs/source/deploy.rst b/docs/source/deploy.rst index b6ccbe30..10bc8458 100644 --- a/docs/source/deploy.rst +++ b/docs/source/deploy.rst @@ -232,12 +232,14 @@ systemd: Description=gunicorn daemon [Service] - User=urban + Type=forking + PIDFile=/home/urban/gunicorn/gunicorn.pid + User=someuser WorkingDirectory=/home/urban/gunicorn/bin - ExecStart=/home/urban/gunicorn/bin/gunicorn --debug --log-level debug test:app - - [Install] - WantedBy=multi-user.target + ExecStart=/home/someuser/gunicorn/bin/gunicorn -p /home/urban/gunicorn/gunicorn.pid- test:app + ExecReload=/bin/kill -s HUP $MAINPID + ExecStop=/bin/kill -s QUIT $MAINPID + PrivateTmp=true **gunicorn.socket**:: @@ -245,7 +247,7 @@ systemd: Description=gunicorn socket [Socket] - ListenStream=/run/unicorn.sock + ListenStream=/run/gunicorn.sock ListenStream=0.0.0.0:9000 ListenStream=[::]:8000 @@ -255,7 +257,7 @@ systemd: After running curl http://localhost:9000/ gunicorn should start and you should see something like that in logs:: - 2013-02-19 23:48:19 [31436] [DEBUG] Socket activation sockets: unix:/run/unicorn.sock,http://0.0.0.0:9000,http://[::]:8000 + 2013-02-19 23:48:19 [31436] [DEBUG] Socket activation sockets: unix:/run/gunicorn.sock,http://0.0.0.0:9000,http://[::]:8000 Logging =======