mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-31 23:58:57 +02:00
Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
105
roles/web-app-matrix/templates/docker-compose.yml.j2
Normal file
105
roles/web-app-matrix/templates/docker-compose.yml.j2
Normal file
@@ -0,0 +1,105 @@
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
synapse:
|
||||
{% set container_port = 8008 %}
|
||||
image: "{{ applications[application_id].images.synapse }}"
|
||||
container_name: matrix-synapse
|
||||
restart: {{docker_restart_policy}}
|
||||
logging:
|
||||
driver: journald
|
||||
volumes:
|
||||
- synapse_data:/data
|
||||
- ./homeserver.yaml:/data/homeserver.yaml:ro
|
||||
- ./{{domains.matrix.synapse}}.log.config:/data/{{domains.matrix.synapse}}.log.config:ro
|
||||
{% for item in bridges %}
|
||||
- {{docker_compose.directories.instance}}mautrix/{{item.bridge_name}}/registration.yaml:{{registration_file_folder}}{{item.bridge_name}}.registration.yaml:ro
|
||||
{% endfor %}
|
||||
environment:
|
||||
- SYNAPSE_SERVER_NAME={{domains.matrix.synapse}}
|
||||
- SYNAPSE_REPORT_STATS=no
|
||||
ports:
|
||||
- "127.0.0.1:{{ports.localhost.http.synapse}}:{{ container_port }}"
|
||||
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||
{% if bridges | length > 0 %}
|
||||
{% for item in bridges %}
|
||||
mautrix-{{item.bridge_name}}:
|
||||
condition: service_healthy
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
element:
|
||||
{% set container_port = 80 %}
|
||||
image: "{{ applications[application_id].images.element }}"
|
||||
container_name: matrix-element
|
||||
restart: {{docker_restart_policy}}
|
||||
volumes:
|
||||
- ./element-config.json:/app/config.json
|
||||
ports:
|
||||
- "127.0.0.1:{{ports.localhost.http.element}}:{{ container_port }}"
|
||||
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{% for item in bridges %}
|
||||
mautrix-{{item.bridge_name}}:
|
||||
container_name: matrix-{{item.bridge_name}}
|
||||
image: dock.mau.dev/mautrix/{{ item.bridge_name }}:latest
|
||||
restart: {{docker_restart_policy}}
|
||||
volumes:
|
||||
- ./mautrix/{{item.bridge_name}}:/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "test -f {{registration_file_folder}}registration.yaml || exit 1"]
|
||||
interval: 1m
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% endfor %}
|
||||
{% if applications[application_id].plugins.chatgpt | bool %}
|
||||
matrix-chatgpt-bot:
|
||||
restart: {{docker_restart_policy}}
|
||||
container_name: matrix-chatgpt
|
||||
image: ghcr.io/matrixgpt/matrix-chatgpt-bot:latest
|
||||
volumes:
|
||||
- chatgpt_data:/storage
|
||||
environment:
|
||||
OPENAI_API_KEY: '{{applications[application_id].credentials.chatgpt_bridge_openai_api_key}}'
|
||||
# Uncomment the next two lines if you are using Azure OpenAI API
|
||||
# OPENAI_AZURE: 'false'
|
||||
# CHATGPT_REVERSE_PROXY: 'your-completion-endpoint-here'
|
||||
CHATGPT_CONTEXT: 'thread'
|
||||
CHATGPT_API_MODEL: 'gpt-3.5-turbo'
|
||||
# Uncomment and edit the next line if needed
|
||||
# CHATGPT_PROMPT_PREFIX: 'Instructions:\nYou are ChatGPT, a large language model trained by OpenAI.'
|
||||
# CHATGPT_IGNORE_MEDIA: 'false'
|
||||
CHATGPT_REVERSE_PROXY: 'https://api.openai.com/v1/chat/completions'
|
||||
# Uncomment and edit the next line if needed
|
||||
# CHATGPT_TEMPERATURE: '0.8'
|
||||
# Uncomment and edit the next line if needed
|
||||
#CHATGPT_MAX_CONTEXT_TOKENS: '4097'
|
||||
CHATGPT_MAX_PROMPT_TOKENS: '3000'
|
||||
KEYV_BACKEND: 'file'
|
||||
KEYV_URL: ''
|
||||
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_DEFAULT_PREFIX: '!chatgpt'
|
||||
MATRIX_DEFAULT_PREFIX_REPLY: 'false'
|
||||
#MATRIX_BLACKLIST: ''
|
||||
MATRIX_WHITELIST: ':{{applications[application_id].server_name}}'
|
||||
MATRIX_AUTOJOIN: 'true'
|
||||
MATRIX_ENCRYPTION: 'true'
|
||||
MATRIX_THREADS: 'true'
|
||||
MATRIX_PREFIX_DM: 'false'
|
||||
MATRIX_RICH_TEXT: 'true'
|
||||
{% endif %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
synapse_data:
|
||||
{% if applications[application_id].plugins.chatgpt | bool %}
|
||||
chatgpt_data:
|
||||
{% endif %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
Reference in New Issue
Block a user