mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
improve systemd conf
This commit is contained in:
parent
047ef65afc
commit
2a09c916a7
@ -232,12 +232,14 @@ systemd:
|
|||||||
Description=gunicorn daemon
|
Description=gunicorn daemon
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=urban
|
Type=forking
|
||||||
|
PIDFile=/home/urban/gunicorn/gunicorn.pid
|
||||||
|
User=someuser
|
||||||
WorkingDirectory=/home/urban/gunicorn/bin
|
WorkingDirectory=/home/urban/gunicorn/bin
|
||||||
ExecStart=/home/urban/gunicorn/bin/gunicorn --debug --log-level debug test:app
|
ExecStart=/home/someuser/gunicorn/bin/gunicorn -p /home/urban/gunicorn/gunicorn.pid- test:app
|
||||||
|
ExecReload=/bin/kill -s HUP $MAINPID
|
||||||
[Install]
|
ExecStop=/bin/kill -s QUIT $MAINPID
|
||||||
WantedBy=multi-user.target
|
PrivateTmp=true
|
||||||
|
|
||||||
**gunicorn.socket**::
|
**gunicorn.socket**::
|
||||||
|
|
||||||
@ -245,7 +247,7 @@ systemd:
|
|||||||
Description=gunicorn socket
|
Description=gunicorn socket
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
ListenStream=/run/unicorn.sock
|
ListenStream=/run/gunicorn.sock
|
||||||
ListenStream=0.0.0.0:9000
|
ListenStream=0.0.0.0:9000
|
||||||
ListenStream=[::]:8000
|
ListenStream=[::]:8000
|
||||||
|
|
||||||
@ -255,7 +257,7 @@ systemd:
|
|||||||
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::
|
||||||
|
|
||||||
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
|
Logging
|
||||||
=======
|
=======
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user