chainetv/templates/systemd/gunicorn.service.j2
2019-04-26 14:04:48 +02:00

18 lines
493 B
Django/Jinja

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