Commit fe712be0 authored by Florian Haas's avatar Florian Haas
Browse files

Follow upstream recommendations for systemd unit files

Upstream no longer recommends Circus for use as the Taiga service
manager, and instead suggests systemd.

Include minor modifications to the systemd unit files, based on:
https://taigaio.github.io/taiga-doc/dist/setup-production.html#systemd-and-gunicorn
parent 9f8d8e3b
[Unit]
Description=Taiga Celery asynchronous task processing service
After=network.target
[Service]
Type=simple
Restart=on-failure
WorkingDirectory={{ taiga_user_home }}/{{ taiga_back_checkout_dir }}
ExecStart={{ taiga_user_home }}/{{ taiga_back_venv_dir }}/bin/celery -A taiga worker -c 4
ExecStart={{ taiga_user_home }}/{{ taiga_back_venv_dir }}/bin/celery -A taiga worker --concurrency {{ ansible_processor_vcpus }}
ExecStop=/bin/kill -TERM $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
Environment="PATH={{ taiga_back_venv_dir }}/bin:$PATH"
......@@ -14,7 +15,7 @@ Environment="SHELL=/bin/bash"
Environment="USER={{ taiga_user }}"
Environment="LANG=en_US.UTF-8"
Environment="HOME={{ taiga_user_home }}"
Environment="PYTHONPATH={{ taiga_user_home }}/{{ taiga_back_venv_dir }}/lib/python3.5/site-packages"
Environment="PYTHONUNBUFFERED=true"
User={{ taiga_user }}
[Install]
......
{% set _listen_address = '127.0.0.1' if _taiga_is_front_node else '0.0.0.0' %}
[Unit]
Description=Taiga backend service
After=network.target
[Service]
User={{ taiga_user }}
Restart=on-failure
RestartSec=3
WorkingDirectory={{ taiga_user_home }}/{{ taiga_back_checkout_dir }}
ExecStart={{ taiga_user_home }}/{{ taiga_back_venv_dir }}/bin/gunicorn -w 3 -t 60 --pythonpath=. -b {{ _listen_address }}:{{ taiga_backend_port }}{{ ' --log-level debug' if taiga_back_debug else '' }} taiga.wsgi
ExecStart={{ taiga_user_home }}/{{ taiga_back_venv_dir }}/bin/gunicorn --workers {{ ansible_processor_vcpus }} --timeout 60 -b {{ _listen_address }}:{{ taiga_backend_port }}{{ ' --log-level debug' if taiga_back_debug else '' }} taiga.wsgi
ExecStop=/bin/kill -TERM $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
Environment="PYTHONUNBUFFERED=true"
Environment="PATH={{ taiga_user_home }}/{{ taiga_back_venv_dir }}/bin:$PATH"
Environment="TERM=rxvt-256color"
Environment="SHELL=/bin/bash"
Environment="USER={{ taiga_user }}"
Environment="LANG=en_US.UTF-8"
Environment="HOME={{ taiga_user_home }}"
Environment="PYTHONPATH={{ taiga_user_home }}/{{ taiga_back_venv_dir }}/lib/python3.5/site-packages"
User={{ taiga_user }}
[Install]
WantedBy=default.target
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment