supysonic/templates/systemd/gunicorn.service.j2

18 lines
672 B
Plaintext
Raw Normal View History

2019-05-13 17:00:10 +00:00
[Unit]
Description=gunicorn daemon for {{supysonic_name}}
2020-11-04 17:24:58 +00:00
After=network.target {{ 'postgresql.service' if supysonic_DB_type == 'postgres' else mysqld.service supysonic_DB_type == 'mysql' }}
2019-05-13 17:00:10 +00:00
[Service]
PIDFile=/run/gunicorn-{{supysonic_name}}/pid
User={{exec_user}}
Group={{exec_group}}
2019-05-14 08:23:48 +00:00
RuntimeDirectory=gunicorn-{{supysonic_name}}
2019-05-13 17:00:10 +00:00
WorkingDirectory={{source_location}}/{{supysonic_name}}/cgi-bin
ExecStart={{venv_location}}{{supysonic_venv_name}}/bin/gunicorn -b 0.0.0.0:8001 --workers=4 --pid /run/gunicorn-{{supysonic_name}}/pid server:app
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=true
2019-05-15 17:25:26 +00:00
[Install]
2019-05-16 15:10:03 +00:00
WantedBy=multi-user.target