mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-10-10 10:48:10 +02:00
Add healthchecks for all Taiga services, fix RabbitMQ env var names, and define TAIGA_HOSTNAME
Details: - Implemented healthchecks for taiga, async, rabbitmq, front, events, protected, and gateway - Corrected RabbitMQ env variables (RABBITMQ_DEFAULT_USER/PASS/VHOST/ERLANG_COOKIE) - Added TAIGA_HOSTNAME for backend service See: https://chatgpt.com/share/68da9d6b-b164-800f-bcb7-410b40219a1e
This commit is contained in:
@@ -3,7 +3,14 @@
|
||||
{% set service_name = TAIGA_SERVICE %}
|
||||
{{ service_name }}:
|
||||
container_name: {{ TAIGA_CONTAINER }}
|
||||
hostname: {{ TAIGA_HOSTNAME }}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1',8000),5).close()"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 40s
|
||||
image: "{{ TAIGA_DOCKER_IMAGE_BACKEND }}:{{ TAIGA_VERSION }}"
|
||||
volumes:
|
||||
# These volumens will be used by taiga-back and taiga-async.
|
||||
@@ -31,6 +38,12 @@
|
||||
{{ service_name }}:
|
||||
container_name: {{ TAIGA_CONTAINER }}-{{ service_name }}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "tr '\\0' ' ' </proc/1/cmdline | grep -qi celery"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
image: "{{ TAIGA_DOCKER_IMAGE_BACKEND }}:{{ TAIGA_VERSION }}"
|
||||
entrypoint: ["/taiga-back/docker/async_entrypoint.sh"]
|
||||
volumes:
|
||||
@@ -65,6 +78,12 @@
|
||||
volumes:
|
||||
- async-rabbitmq-data:/var/lib/rabbitmq
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
healthcheck:
|
||||
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
taiga:
|
||||
|
||||
@@ -73,6 +92,12 @@
|
||||
container_name: {{ TAIGA_CONTAINER }}-{{ service_name }}
|
||||
image: "{{TAIGA_DOCKER_IMAGE_FRONTEND}}:{{ TAIGA_VERSION }}"
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null || curl -fsS http://127.0.0.1/ >/dev/null"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
taiga:
|
||||
# volumes:
|
||||
@@ -83,6 +108,12 @@
|
||||
container_name: {{ TAIGA_CONTAINER }}-{{ service_name }}
|
||||
image: taigaio/taiga-events:latest
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "nc -z 127.0.0.1 8888"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
taiga:
|
||||
depends_on:
|
||||
@@ -97,7 +128,12 @@
|
||||
volumes:
|
||||
- events-rabbitmq-data:/var/lib/rabbitmq
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
taiga:
|
||||
|
||||
@@ -106,7 +142,12 @@
|
||||
container_name: {{ TAIGA_CONTAINER }}-{{ service_name }}
|
||||
image: taigaio/taiga-protected:latest
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1',8003),5).close()"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
taiga:
|
||||
|
||||
@@ -121,7 +162,12 @@
|
||||
- static-data:/taiga/static
|
||||
- media-data:/taiga/media
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null || curl -fsS http://127.0.0.1/ >/dev/null"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
taiga:
|
||||
depends_on:
|
||||
|
@@ -33,10 +33,10 @@ RABBITMQ_PASS=taiga
|
||||
RABBITMQ_VHOST=taiga
|
||||
|
||||
# Taiga's RabbitMQ settings - Variables to leave messages for the realtime and asynchronous events
|
||||
RABBITMQ_DEFAULT_RABBITMQ_USER = taiga # user to connect to RabbitMQ
|
||||
RABBITMQ_DEFAULT_RABBITMQ_PASS = taiga # RabbitMQ user's password
|
||||
RABBITMQ_DEFAULT_RABBITMQ_VHOST = taiga # RabbitMQ container name
|
||||
RABBITMQ_ERLANG_COOKIE = secret-erlang-cookie # unique value shared by any connected instance of RabbitMQ
|
||||
RABBITMQ_DEFAULT_USER = taiga # user to connect to RabbitMQ
|
||||
RABBITMQ_DEFAULT_PASS = taiga # RabbitMQ user's password
|
||||
RABBITMQ_DEFAULT_VHOST = taiga # 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
|
||||
ATTACHMENTS_MAX_AG = 360 # token expiration date (in seconds)
|
||||
|
@@ -36,6 +36,7 @@ TAIGA_VERSION: "{{ applications | get_app_conf(application_id,
|
||||
|
||||
### Backend
|
||||
TAIGA_SERVICE: "{{ entity_name }}"
|
||||
TAIGA_HOSTNAME: "taiga-back"
|
||||
TAIGA_CONTAINER: "{{ entity_name }}"
|
||||
TAIGA_VOLUME_MEDIA: "/taiga-back/media"
|
||||
TAIGA_VOLUME_STATIC: "/taiga-back/static"
|
||||
|
Reference in New Issue
Block a user