This commit is contained in:
a
2026-01-13 14:46:34 -08:00
parent b24acbce91
commit 2e1db6a254
6 changed files with 72 additions and 44 deletions
+4 -7
View File
@@ -10,19 +10,17 @@ LETS_ENCRYPT_ENV=production
# Taiga's URLs - Variables to define where Taiga should be served
TAIGA_SCHEME=http # serve Taiga using "http" or "https" (secured) connection
TAIGA_DOMAIN=localhost:9000 # Taiga's base URL
TAIGA_SCHEME=https # serve Taiga using "http" or "https" (secured) connection
TAIGA_DOMAIN=$DOMAIN # Taiga's base URL
SUBPATH="" # it'll be appended to the TAIGA_DOMAIN (use either "" or a "/subpath")
WEBSOCKETS_SCHEME=ws # events connection protocol (use either "ws" or "wss")
WEBSOCKETS_SCHEME=wss # events connection protocol (use either "ws" or "wss")
# Taiga's Secret Key - Variable to provide cryptographic signing
SECRET_KEY="taiga-secret-key" # Please, change it to an unpredictable value!!
SECRET_TAIGA_SECRET_VERSION=v1
SECRET_POSTGRES_PASSWORD_VERSION=v1
SECRET_RABBITMQ_PASSWORD_VERSION=v1
# Taiga's Database settings - Variables to create the Taiga database and connect to it
POSTGRES_USER=taiga # user to connect to PostgreSQL
POSTGRES_PASSWORD=taiga # database user's password
POSTGRES_HOST=taiga
POSTGRES_DB=taiga-db
@@ -39,8 +37,7 @@ EMAIL_USE_SSL=False # use implicit TLS (secure) connection with the SMTP server
# Taiga's RabbitMQ settings - Variables to leave messages for the realtime and asynchronous events
RABBITMQ_USER=taiga # user to connect to RabbitMQ
RABBITMQ_PASS=taiga # RabbitMQ user's password
RABBITMQ_VHOST=taiga # RabbitMQ container name
RABBITMQ_VHOST=taiga-events-rabbitmq # RabbitMQ container name
RABBITMQ_ERLANG_COOKIE=secret-erlang-cookie # unique value shared by any connected instance of RabbitMQ
# Taiga's Attachments - Variable to define how long the attachments will be accesible
+1
View File
@@ -3,3 +3,4 @@
export NGINX_CONF_VERSION=v1
export TAIGA_ENTRYPOINT_VERSION=v1
export TAIGA_ASYNC_ENTRYPOINT_VERSION=v1
+15 -2
View File
@@ -48,6 +48,8 @@ services:
# Rabbitmq settings
- RABBITMQ_USER=${RABBITMQ_USER}
- RABBITMQ_PASS=/run/secrets/rabbitmq_password
- TAIGA_EVENTS_RABBITMQ_HOST=${RABBITMQ_VHOST}
- TAIGA_ASYNC_RABBITMQ_HOST=${RABBITMQ_VHOST}
# Telemetry settings
- ENABLE_TELEMETRY=${ENABLE_TELEMETRY}
# ...your customizations go here
@@ -64,7 +66,11 @@ services:
taiga-back-async:
image: taigaio/taiga-back:latest
entrypoint: ["/taiga-back/docker/async_entrypoint.sh"]
configs:
- source: taiga_async_entrypoint
target: /custom-async-entrypoint.sh
mode: 0555
entrypoint: /custom-async-entrypoint.sh
secrets:
- taiga_secret
- postgres_password
@@ -93,6 +99,9 @@ services:
# Rabbitmq settings
- RABBITMQ_USER=${RABBITMQ_USER}
- RABBITMQ_PASS=/run/secrets/rabbitmq_password
- TAIGA_ASYNC_RABBITMQ_HOST=${RABBITMQ_VHOST}
- TAIGA_EVENTS_RABBITMQ_HOST=${RABBITMQ_VHOST}
- EVENTS_PUSH_BACKEND_URL=amqp://guest:password@taiga-async-rabbitmq:5672/run/secrets/rabbitmq_password%40taiga-events-rabbitmq%3A5672/taiga
# Telemetry settings
- ENABLE_TELEMETRY=${ENABLE_TELEMETRY}
# ...your customizations go here
@@ -207,12 +216,16 @@ secrets:
configs:
nginx_conf:
name: ${STACK_NAME}_nginx_${NGINX_CONF_VERSION}
file: ./taiga-gateway/nginx.conf
file: ./taiga-gateway/taiga.backup.conf
template_driver: golang
taiga_entrypoint:
name: ${STACK_NAME}_taiga_entrypoint_${TAIGA_ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
taiga_async_entrypoint:
name: ${STACK_NAME}_taiga_async_entrypoint_${TAIGA_ASYNC_ENTRYPOINT_VERSION}
file: entrypoint-async.sh.tmpl
template_driver: golang
volumes:
taiga-static-data:
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
set -e
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
echo "Giving the db container some time to come up"; sleep 30
echo "Listing all env vars"; printenv
/taiga-back/docker/async_entrypoint.sh
@@ -1,67 +1,53 @@
server {
listen 80 default_server;
server_name taiga.mirnet.org;
return 301 https://$server_name$request_uri;
}
server {
listen 443 default_server;
server_name taiga.mirnet.org; # See http://nginx.org/en/docs/http/server_names.html
large_client_header_buffers 4 32k;
client_max_body_size 50M;
client_max_body_size 100M;
charset utf-8;
access_log /home/taiga/logs/nginx.access.log;
error_log /home/taiga/logs/nginx.error.log;
# TLS: Configure your TLS following the best practices inside your company
# Other configurations
# Frontend
location / {
alias /home/taiga/taiga-front-dist/dist/;
index index.html;
try_files $uri $uri/ index.html =404;
proxy_pass http://taiga-front/;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
# API
location /api/ {
proxy_pass http://taiga-back:8000/api/;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8001/api/;
proxy_redirect off;
}
# Admin
location /admin/ {
proxy_pass http://taiga-back:8000/admin/;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8001/admin/;
proxy_redirect off;
}
# Static files
# Static
location /static/ {
alias /home/taiga/taiga-back/static/;
alias /taiga/static/;
}
# Media
location /_protected/ {
internal;
alias /home/taiga/taiga-back/media/;
alias /taiga/media/;
add_header Content-disposition "attachment";
}
# Unprotected section
location /media/exports/ {
alias /home/taiga/taiga-back/media/exports/;
alias /taiga/media/exports/;
add_header Content-disposition "attachment";
}
@@ -71,19 +57,18 @@ server {
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8003/;
proxy_pass http://taiga-protected:8003/;
proxy_redirect off;
}
# Events
location /events {
proxy_pass http://taiga-events:8888/events;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
proxy_pass http://127.0.0.1:8888/events;
}
}
+4 -1
View File
@@ -3,7 +3,6 @@ server {
client_max_body_size 100M;
charset utf-8;
# Frontend
location / {
proxy_pass http://taiga-front/;
@@ -12,6 +11,7 @@ server {
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
add_header Access-Control-Allow-Origin *;
}
# API
@@ -22,6 +22,7 @@ server {
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
add_header Access-Control-Allow-Origin *;
}
# Admin
@@ -32,6 +33,7 @@ server {
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
add_header Access-Control-Allow-Origin *;
}
# Static
@@ -71,5 +73,6 @@ server {
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
add_header Access-Control-Allow-Origin *;
}
}