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}}
|
2019-05-09 10:23:36 +00:00
|
|
|
ExecStart={{venv_location}}{{venv_name}}/bin/gunicorn --workers=4 --pid /run/gunicorn-{{name}}/pid \
|
2019-04-26 12:04:48 +00:00
|
|
|
--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
|
|
|
|
|