Semi bsr for applications[] to prevent heavy to debug bugs in j2 - part 1

This commit is contained in:
2025-07-13 15:11:38 +02:00
parent 4cc4195fab
commit 756597668c
107 changed files with 277 additions and 277 deletions

View File

@@ -1,7 +1,7 @@
{% include 'roles/docker-compose/templates/base.yml.j2' %}
synapse:
{% set container_port = 8008 %}
image: "{{ applications[application_id].images.synapse }}"
image: "{{ applications | get_app_conf(application_id, 'images.synapse', True) }}"
container_name: matrix-synapse
restart: {{docker_restart_policy}}
logging:
@@ -30,7 +30,7 @@
{% include 'roles/docker-container/templates/networks.yml.j2' %}
element:
{% set container_port = 80 %}
image: "{{ applications[application_id].images.element }}"
image: "{{ applications | get_app_conf(application_id, 'images.element', True) }}"
container_name: matrix-element
restart: {{docker_restart_policy}}
volumes:
@@ -54,7 +54,7 @@
retries: 3
{% include 'roles/docker-container/templates/networks.yml.j2' %}
{% endfor %}
{% if applications[application_id].plugins.chatgpt | bool %}
{% if applications | get_app_conf(application_id, 'plugins', True).chatgpt | bool %}
matrix-chatgpt-bot:
restart: {{docker_restart_policy}}
container_name: matrix-chatgpt
@@ -62,7 +62,7 @@
volumes:
- chatgpt_data:/storage
environment:
OPENAI_API_KEY: '{{applications[application_id].credentials.chatgpt_bridge_openai_api_key}}'
OPENAI_API_KEY: '{{applications | get_app_conf(application_id, 'credentials.chatgpt_bridge_openai_api_key', True)}}'
# Uncomment the next two lines if you are using Azure OpenAI API
# OPENAI_AZURE: 'false'
# CHATGPT_REVERSE_PROXY: 'your-completion-endpoint-here'
@@ -82,13 +82,13 @@
KEYV_BOT_ENCRYPTION: 'false'
KEYV_BOT_STORAGE: 'true'
MATRIX_HOMESERVER_URL: 'https://{{domains.matrix.synapse}}'
MATRIX_BOT_USERNAME: '@chatgptbot:{{applications[application_id].server_name}}'
MATRIX_ACCESS_TOKEN: '{{ applications[application_id].credentials.chatgpt_bridge_access_token | default('') }}'
MATRIX_BOT_PASSWORD: '{{applications[application_id].credentials.chatgpt_bridge_user_password}}'
MATRIX_BOT_USERNAME: '@chatgptbot:{{applications | get_app_conf(application_id, 'server_name', True)}}'
MATRIX_ACCESS_TOKEN: '{{ applications | get_app_conf(application_id, 'credentials.chatgpt_bridge_access_token', True) | default('') }}'
MATRIX_BOT_PASSWORD: '{{applications | get_app_conf(application_id, 'credentials.chatgpt_bridge_user_password', True)}}'
MATRIX_DEFAULT_PREFIX: '!chatgpt'
MATRIX_DEFAULT_PREFIX_REPLY: 'false'
#MATRIX_BLACKLIST: ''
MATRIX_WHITELIST: ':{{applications[application_id].server_name}}'
MATRIX_WHITELIST: ':{{applications | get_app_conf(application_id, 'server_name', True)}}'
MATRIX_AUTOJOIN: 'true'
MATRIX_ENCRYPTION: 'true'
MATRIX_THREADS: 'true'
@@ -98,7 +98,7 @@
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
synapse_data:
{% if applications[application_id].plugins.chatgpt | bool %}
{% if applications | get_app_conf(application_id, 'plugins', True).chatgpt | bool %}
chatgpt_data:
{% endif %}