Added get_domain function

This commit is contained in:
2025-05-17 14:53:55 +02:00
parent ad51597e2e
commit 3388d3c592
94 changed files with 288 additions and 141 deletions

View File

@@ -7,7 +7,7 @@
include_role:
name: nginx-domain-setup
vars:
domain: "{{ domains[application_id] }}"
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
- name: "copy docker-compose.yml and env file"

View File

@@ -14,7 +14,7 @@ services:
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
healthcheck:
test: ["CMD", "sh", "-c", "exec 3<>/dev/tcp/localhost/9000 && echo -e 'GET /health/live HTTP/1.1\\r\\nHost: {{domains.keycloak}}\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3"]
test: ["CMD", "sh", "-c", "exec 3<>/dev/tcp/localhost/9000 && echo -e 'GET /health/live HTTP/1.1\\r\\nHost: {{domains | get_domain('keycloak')}}\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3"]
interval: 30s
timeout: 10s
retries: 3

View File

@@ -2,7 +2,7 @@
# Documentation can be found here:
# @see https://www.keycloak.org/server/containers
KC_HOSTNAME= https://{{domains[application_id]}}
KC_HOSTNAME= https://{{domains | get_domain(application_id)}}
KC_HTTP_ENABLED= true
# Health Checks

View File

@@ -517,7 +517,7 @@
"/realms/{{realm}}/account/*"
],
"webOrigins": [
"{{ web_protocol }}://{{domains.keycloak}}"
"{{ web_protocol }}://{{domains | get_domain('keycloak')}}"
],
"notBefore": 0,
"bearerOnly": false,
@@ -1663,7 +1663,7 @@
"replyTo": "",
"host": "{{system_email.host}}",
"from": "{{ users['no-reply'].email }}",
"fromDisplayName": "Keycloak Authentification System - {{domains.keycloak}}",
"fromDisplayName": "Keycloak Authentification System - {{domains | get_domain('keycloak')}}",
"envelopeFrom": "",
"ssl": "true",
"user": "{{ users['no-reply'].email }}"