Feat: Added element call setup and configuration.

This commit is contained in:
wjbeckett
2024-09-25 14:53:48 +10:00
parent 482861fce1
commit 6594cce570
20 changed files with 676 additions and 0 deletions

View File

@ -0,0 +1,11 @@
{
"default_server_config": {
"m.homeserver": {
"base_url": "{{ matrix_homeserver_url }}",
"server_name": "{{ matrix_server_name }}"
}
},
"livekit": {
"livekit_service_url": "{{ matrix_element_call_livekit_service_url }}"
}
}

View File

@ -0,0 +1,9 @@
# Environment variables for Element Call
ELEMENT_CALL_SERVER_URL=https://{{ matrix_element_call_domain }}
LIVEKIT_SERVICE_URL={{ matrix_element_call_livekit_service_url }}
JWT_SERVICE_URL={{ matrix_element_call_jwt_service_url }}
# Optional additional environment variables provided by the user
{% for key, value in matrix_element_call_environment_variables_additional.items() %}
{{ key }}={{ value }}
{% endfor %}

View File

@ -0,0 +1,11 @@
# Docker labels for Traefik or other routing
traefik.enable: "true"
traefik.http.routers.{{ matrix_element_call_hostname | replace('.', '_') }}-router.rule: "Host(`{{ matrix_element_call_hostname }}`)"
traefik.http.routers.{{ matrix_element_call_hostname | replace('.', '_') }}-router.entrypoints: "{{ matrix_element_call_container_labels_traefik_entrypoints }}"
traefik.http.routers.{{ matrix_element_call_hostname | replace('.', '_') }}-router.tls.certresolver: "{{ matrix_element_call_container_labels_traefik_tls_certResolver }}"
traefik.http.services.{{ matrix_element_call_hostname | replace('.', '_') }}-service.loadbalancer.server.port: "8080"
# Additional labels (if any) specified by the user
{% for key, value in matrix_element_call_container_extra_arguments.items() %}
{{ key }}: "{{ value }}"
{% endfor %}

View File

@ -0,0 +1,21 @@
port: 7880
bind_addresses:
- "0.0.0.0"
rtc:
tcp_port: 7881
port_range_start: 50100
port_range_end: 50200
use_external_ip: false
turn:
enabled: false
domain: localhost
cert_file: ""
key_file: ""
tls_port: 5349
udp_port: 443
external_tls: true
keys:
devkey: "{{ matrix_element_call_livekit_dev_key }}"
logging:

View File

@ -0,0 +1,5 @@
bind 0.0.0.0
protected-mode yes
port 6379
timeout 0
tcp-keepalive 300

View File

@ -0,0 +1,17 @@
[Unit]
Description=Matrix Element Call Service
After=docker.service
Requires=docker.service
[Service]
Type=simple
ExecStart=/usr/bin/docker start -a matrix-element-call
ExecStop=/usr/bin/docker stop matrix-element-call
Restart=always
User={{ matrix_user_username }}
Group={{ matrix_user_groupname }}
TimeoutStartSec=0
RestartSec=10
[Install]
WantedBy=multi-user.target