removed redis images in favor of the inbuilt keyDB

This commit is contained in:
wjbeckett 2024-10-01 10:41:30 +10:00
parent 7cdec5f251
commit d5aabc85be
7 changed files with 1 additions and 82 deletions

View File

@ -439,8 +439,6 @@ devture_systemd_service_manager_services_list_auto: |
+
([{'name': 'matrix-livekit-server.service', 'priority': 3000, 'groups': ['matrix', 'livekit-server']}] if matrix_livekit_server_enabled else [])
+
([{'name': 'matrix-redis.service', 'priority': 450, 'groups': ['matrix', 'redis']}] if matrix_element_call_enabled else [])
+
([{'name': 'matrix-registration.service', 'priority': 4000, 'groups': ['matrix', 'registration', 'matrix-registration']}] if matrix_registration_enabled else [])
+
([{'name': 'matrix-sliding-sync.service', 'priority': 1500, 'groups': ['matrix', 'sliding-sync']}] if matrix_sliding_sync_enabled else [])

View File

@ -14,11 +14,9 @@ matrix_element_call_container_additional_networks: [] # No additional networks
# Docker images
matrix_element_call_image: "ghcr.io/element-hq/element-call:latest"
redis_image: "redis:6-alpine"
# Ports
matrix_element_call_port: "8093"
redis_port: "6379"
# Well-known paths and domains (derived from matrix_domain)
matrix_element_call_domain: "call.{{ matrix_domain }}"
@ -26,11 +24,6 @@ matrix_element_call_well_known_client_path: "{{ matrix_base_data_path }}/static-
matrix_element_call_well_known_element_path: "{{ matrix_base_data_path }}/static-files/public/.well-known/element/element.json"
matrix_element_call_base_url: "https://{{ matrix_element_call_domain }}"
# Redis Configuration for Element Call
redis_hostname: "localhost"
#redis_port: 6379
redis_password: ""
# Traefik Configuration for Element Call
matrix_element_call_container_labels_traefik_enabled: true
matrix_element_call_container_labels_traefik_docker_network: "{{ matrix_element_call_container_network }}"

View File

@ -22,14 +22,6 @@
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure Redis redis.conf is in place
ansible.builtin.template:
src: "{{ role_path }}/templates/redis.conf.j2"
dest: "{{ matrix_element_call_base_path }}/backend/redis.conf"
mode: 0640
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure matrix-element-call Docker labels file is in place
ansible.builtin.template:
src: "{{ role_path }}/templates/element-call-labels.j2"
@ -49,29 +41,13 @@
delay: "{{ devture_playbook_help_container_retries_delay }}"
until: element_call_image_result is not failed
- name: Ensure redis Docker image is pulled
community.docker.docker_image:
name: "{{ redis_image }}"
source: pull
register: redis_image_result
retries: 3
delay: 10
until: redis_image_result is not failed
# Systemd Services for Element Call, JWT Service, LiveKit, and Redis
# Systemd Services for Element Call
- name: Ensure matrix-element-call systemd service is installed
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-element-call.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-element-call.service"
mode: 0644
- name: Ensure redis systemd service is installed
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-redis.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-redis.service"
mode: 0644
# Update homeserver.yaml for Element Call
- name: Add listeners section for Element Call to homeserver.yaml
ansible.builtin.blockinfile:

View File

@ -6,21 +6,11 @@
name: "matrix-element-call"
state: absent
- name: Stop and remove redis container
community.docker.docker_container:
name: "matrix-redis"
state: absent
- name: Remove matrix-element-call systemd service
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-element-call.service"
state: absent
- name: Remove redis systemd service
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-redis.service"
state: absent
- name: Remove matrix-element-call configuration files
ansible.builtin.file:
path: "{{ matrix_element_call_base_path }}"

View File

@ -10,4 +10,3 @@
- {'name': 'matrix_element_call_base_path', when: true}
- {'name': 'matrix_element_call_container_network', when: true}
- {'name': 'matrix_element_call_image', when: true}
- {'name': 'redis_image', when: true}

View File

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

View File

@ -1,32 +0,0 @@
[Unit]
Description=Matrix Redis Service
After=docker.service
Requires=docker.service
[Service]
Type=simple
Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-redis 2>/dev/null || true'
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-redis 2>/dev/null || true'
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--rm \
--name=matrix-redis \
--log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \
--network={{ matrix_element_call_container_network }} \
--mount type=bind,src={{ matrix_element_call_base_path }}/redis.conf,dst=/etc/redis.conf,ro \
{{ redis_image }} \
redis-server /etc/redis.conf
ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-redis
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-redis 2>/dev/null || true'
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-redis 2>/dev/null || true'
Restart=always
RestartSec=30
SyslogIdentifier=matrix-redis
[Install]
WantedBy=multi-user.target