chainetv/templates/systemd/gunicorn.service.j2
2019-05-09 12:23:36 +02:00

18 lines
505 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 --workers=4 --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