Files @ 4a23a2f7f56a
Branch filter:

Location: majic-ansible-roles/roles/wsgi_website/templates/systemd_wsgi_website.service.j2 - annotation

branko
MAR-151: Update/fix test site wsgihello2 role:

- Include six as dependency for ipcalc (bug in packaging of ipcalc).
- Updated requirements for the application.
- Specify the wsgi_requirements_in parameter, and update the
wsgi_requirements parameter.
[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 %}

{% for var, val in environment_variables | dictsort %}
Environment="{{ var }}={{ val }}"
{% endfor %}

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

[Install]
WantedBy=multi-user.target