roles/taiga: Deploy Taiga project management app

The *taiga* role installs the three components of Taiga:

* taiga-back
* taiga-events
* taiga-front

*taiga-back* is a Python application. Its dependencies are installed via
`pip` in the *taiga* user's site-packages, and the application itself is
installed by unpacking the archive. *taiga-events* is a Node.js
application. Its dependencies are installed by `npm`, and is itself
installed by unpacking the archive. Finally, *taiga-front* is a
single-page browser application that is installed by unpacking the
archive, and served by Apache.

Taiga requires PostgreSQL and RabbitMQ.
This commit is contained in:
2019-03-07 13:26:15 -06:00
parent 7211028f4d
commit 251611803f
16 changed files with 334 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
#!/bin/sh
export PYTHONUNBUFFERED=1
cd /usr/local/lib/taiga/taiga-back
exec /usr/local/lib/taiga/venv/bin/gunicorn \
--workers 4 \
-b [::1]:8001 \
taiga.wsgi

View File

@@ -0,0 +1,13 @@
# vim: set ft=systemd :
[Unit]
Description=Taiga Events Server
[Service]
Type=simple
WorkingDirectory=/usr/local/lib/taiga/taiga-events
ExecStart=/usr/local/lib/taiga/taiga-events/node_modules/coffeescript/bin/coffee \
index.coffee
User=taiga
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,33 @@
# vim: set ft=apache :
ProxyRequests off
ProxyPreserveHost on
ProxyPass /api http://localhost:8001/api
ProxyPassReverse /api http://localhost:8001/api
ProxyPass /admin http://localhost:8001/admin
ProxyPassReverse /admin http://localhost:8001/admin
ProxyPass /events ws://localhost:8888/events
Alias /static /usr/local/lib/taiga/taiga-back/static
<Directory /usr/local/lib/taiga/taiga-back/static>
Require all granted
</Directory>
Alias /media /usr/local/lib/taiga/taiga-back/media
<Directory /usr/local/lib/taiga/taiga-back/media>
Require all granted
</Directory>
DocumentRoot /usr/local/lib/taiga/taiga-front-dist/dist
<Directory /usr/local/lib/taiga/taiga-front-dist/dist>
Require all granted
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule /.* https://%{SERVER_NAME}$0
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [L]
</Directory>

View File

@@ -0,0 +1,11 @@
# vim: set ft=systemd :
[Unit]
Description=Taiga Backend Server
[Service]
Type=simple
User=taiga
ExecStart=/usr/local/libexec/taiga-back.sh
[Install]
WantedBy=multi-user.target