Files
computer-playbook/roles/web-app-taiga/templates/docker-compose.yml.j2
Kevin Veen-Birkenbach 73d5651eea web-app-taiga: refactor OIDC gating + defaults
- Introduced dedicated variables in vars/main.yml:
  * TAIGA_FLAVOR_TAIGAIO
  * TAIGA_TAIGAIO_ENABLED
- Replaced inline Jinja2 get_app_conf checks with TAIGA_TAIGAIO_ENABLED for
  consistency in tasks, docker-compose template and env file.
- Adjusted env.j2 to use TAIGA_TAIGAIO_ENABLED instead of direct flavor checks.
- Enabled css by default (true instead of false).
- Cleaned up spacing/indentation in config and env.

This improves readability, reduces duplicated logic, and makes it easier to
maintain both OIDC flavors (robrotheram, taigaio).

Conversation: https://chatgpt.com/share/68af65b3-27c0-800f-964f-ff4f2d96ff5d
2025-08-27 22:08:35 +02:00

136 lines
4.1 KiB
Django/Jinja

{% include 'roles/docker-compose/templates/base.yml.j2' %}
taiga-back:
{% include 'roles/docker-container/templates/base.yml.j2' %}
image: "{{ TAIGA_DOCKER_IMAGE_BACKEND }}:{{ TAIGA_VERSION }}"
volumes:
# These volumens will be used by taiga-back and taiga-async.
- static-data:/taiga-back/static
- media-data:/taiga-back/media
# - ./config.py:/taiga-back/settings/config.py
{% if TAIGA_TAIGAIO_ENABLED %}
- {{ docker_compose.directories.config }}taiga-local.py:/taiga-back/settings/local.py:ro
{% endif %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
taiga:
{% include 'roles/docker-container/templates/depends_on/dmbs_incl.yml.j2' %}
taiga-events-rabbitmq:
condition: service_started
taiga-async-rabbitmq:
condition: service_started
{% if TAIGA_TAIGAIO_ENABLED %}
command: >
/bin/sh -c "
pip install taiga-contrib-oidc-auth &&
/taiga-back/docker/entrypoint.sh"
{% endif %}
taiga-async:
{% include 'roles/docker-container/templates/base.yml.j2' %}
image: "{{ TAIGA_DOCKER_IMAGE_BACKEND }}:{{ TAIGA_VERSION }}"
entrypoint: ["/taiga-back/docker/async_entrypoint.sh"]
volumes:
# These volumens will be used by taiga-back and taiga-async.
- static-data:/taiga-back/static
- media-data:/taiga-back/media
# - ./config.py:/taiga-back/settings/config.py
{% if TAIGA_TAIGAIO_ENABLED %}
{% for item in TAIGA_SETTING_FILES %}
- {{ docker_compose.directories.config }}taiga-{{ item }}.py:/taiga-back/settings/{{ item }}.py:ro
{% endfor %}
{% endif %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
taiga:
{% include 'roles/docker-container/templates/depends_on/dmbs_incl.yml.j2' %}
taiga-events-rabbitmq:
condition: service_started
taiga-async-rabbitmq:
condition: service_started
{% if TAIGA_TAIGAIO_ENABLED %}
command: >
/bin/sh -c "
pip install taiga-contrib-oidc-auth &&
/taiga-back/docker/entrypoint.sh"
{% endif %}
taiga-async-rabbitmq:
image: rabbitmq:3.8-management-alpine
hostname: "taiga-async-rabbitmq"
volumes:
- async-rabbitmq-data:/var/lib/rabbitmq
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
taiga:
taiga-front:
image: "{{TAIGA_DOCKER_IMAGE_FRONTEND}}:{{ TAIGA_VERSION }}"
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
taiga:
# volumes:
# - {{ TAIGA_FRONTEND_CONF_PATH }}:/usr/share/nginx/html/conf.json:ro
taiga-events:
image: taigaio/taiga-events:latest
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
taiga:
depends_on:
taiga-events-rabbitmq:
condition: service_started
taiga-events-rabbitmq:
image: rabbitmq:3.8-management-alpine
hostname: "events-rabbitmq"
volumes:
- events-rabbitmq-data:/var/lib/rabbitmq
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
taiga:
taiga-protected:
image: taigaio/taiga-protected:latest
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
taiga:
taiga-gateway:
image: nginx:alpine
ports:
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
volumes:
- {{ docker_repository_path }}taiga-gateway/taiga.conf:/etc/nginx/conf.d/default.conf
- static-data:/taiga/static
- media-data:/taiga/media
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
taiga:
depends_on:
- taiga-front
- taiga-back
- taiga-events
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
static-data:
media-data:
async-rabbitmq-data:
events-rabbitmq-data:
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
taiga: