Files @ 0a6b8255f0b7
Branch filter:

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

branko
MAR-131: Use Python 3 in test site wsgihello2 role:

- Switch role to use Python 3 via meta dependency.
- Fix the demo application to work with Python 3.
- Update ipcalc dependency (so it would work with Python 3).
[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.iteritems() %}
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