File diff 467a66f3ec65 → 981584549895
roles/wsgi_website/templates/systemd_wsgi_website.service.j2
Show inline comments
 
new file 100644
 
[Unit]
 
Description=Website {{ fqdn }}
 
Requires={{ fqdn }}.socket
 
After=network.target
 

	
 
[Service]
 
User={{ user }}
 
Group={{ user }}
 
WorkingDirectory={{ home }}/code
 
ExecStart={{ home }}/virtualenv/bin/gunicorn --bind unix:/run/wsgi/{{ fqdn }}.sock {% if use_paste %}--paste {{home}}/code/{{ wsgi_application }}{% else %}{{ wsgi_application }}{% endif %}
 

	
 
ExecReload=/bin/kill -s HUP $MAINPID
 
ExecStop=/bin/kill -s TERM $MAINPID
 
PrivateTmp=true
 

	
 
[Install]
 
WantedBy=multi-user.target
 
\ No newline at end of file