Files @ c8d4251a6ea5
Branch filter:

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

branko
MAR-131: Added support for specifying Python version in wsgi_website role:

- Introduced additional role parameter for specifying the Python
version.
- Updated tests to verify new functionality.
- Fixed existing tests to account for differences between Python 2 and
Python 3 - including changes to WSGI test applications.
- Updated documentation, documenting new parameter and fixing one
minor typo.
- Updated release notes.
- Bumped default version of Gunicorn/futures used.
[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