2019-04-25 19:59:52 +00:00
|
|
|
[Unit]
|
2019-04-26 12:04:48 +00:00
|
|
|
Description=gunicorn daemon for {{name}}
|
|
|
|
Requires=gunicorn-{{name}}.socket
|
2019-04-25 19:59:52 +00:00
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
2019-04-26 12:04:48 +00:00
|
|
|
PIDFile=/run/gunicorn-{{name}}/pid
|
|
|
|
User={{exec_user}}
|
|
|
|
Group={{exec_group}}
|
2019-04-25 19:59:52 +00:00
|
|
|
RuntimeDirectory=gunicorn
|
2019-04-26 12:04:48 +00:00
|
|
|
WorkingDirectory={{source_location}}
|
|
|
|
ExecStart={{venv_location}}{{venv_name}}/bin/gunicorn --pid /run/gunicorn-{{name}}/pid \
|
|
|
|
--bind unix:/run/gunicorn-{{name}}/socket run:app
|
2019-04-25 19:59:52 +00:00
|
|
|
ExecReload=/bin/kill -s HUP $MAINPID
|
|
|
|
ExecStop=/bin/kill -s TERM $MAINPID
|
|
|
|
PrivateTmp=true
|
|
|
|
|