diff --git a/roles/matrix/defaults/main.yml b/roles/matrix/defaults/main.yml index d74a0cc..d596b5e 100644 --- a/roles/matrix/defaults/main.yml +++ b/roles/matrix/defaults/main.yml @@ -25,7 +25,6 @@ matrix_install_location: /srv/matrix # The container data volume mount locations matrix_data_location: "{{ matrix_install_location}}/data" matrix_database_location: "{{ matrix_install_location}}/database" -matrix_elementweb_location: "{{ matrix_install_location}}/elementweb" # The certresolver that is used by traefik for this domain matrix_traefik_certresolver: letsencrypt_http @@ -49,42 +48,11 @@ matrix_synapse_version: "1.43.0" matrix_database_version: "13.4" # renovate: depName=docker.io/library/nginx matrix_delegate_nginx_version: "1.21" -# renovate: depName=docker.io/vectorim/element-web -matrix_elementweb_version: "v1.8.5" # Container tag definitions matrix_synapse_image_version: "v{{ matrix_synapse_version }}" matrix_database_image_version: "{{ matrix_database_version }}-alpine" matrix_delegate_nginx_image_version: "{{ matrix_delegate_nginx_version }}-alpine" -matrix_elementweb_image_version: "{{ matrix_elementweb_version }}" - -# The domain that traefik will server element-web under -matrix_elementweb_domain: element.example.com - -# The homeserver URL and display name -matrix_elementweb_base_url: "https://{{ matrix_synapse_domain }}" -matrix_elementweb_servername: "{{ matrix_synapse_servername }}" - -# Controls whether Element shows the presence feature for all (empty list) or specific servers (key = value list with the key being the server url) -matrix_elementweb_enable_presence_by_hs_url: [] - -# Should users only be allowed to use this instance with the given matrix server? -matrix_elementweb_disable_custom_urls: true - -# Should Element-Web disable guests? (without sign-in) -matrix_elementweb_disable_guests: true - -# Should Element-Web disable 3PID login? (Login with Email etc) -matrix_elementweb_disable_3pid_login: false - -# Integration Server URLs to use (see https://github.com/vector-im/element-web/blob/develop/docs/config.md) -matrix_elementweb_integrations_ui_url: "https://scalar.vector.im/" -matrix_elementweb_integrations_rest_url: "https://scalar.vector.im/api" -matrix_elementweb_integrations_widgets_urls: ["https://scalar.vector.im/api"] -matrix_elementweb_integrations_jitsi_widget_url: "https://scalar.vector.im/api/widgets/jitsi.html" - -# Element Web public room directory server(s) -matrix_elementweb_roomdir_servers: ['matrix.org'] # Enable or disable selinux handling matrix_selinux_enabled: true diff --git a/roles/matrix/tasks/main.yml b/roles/matrix/tasks/main.yml index 9782535..8abf6d4 100644 --- a/roles/matrix/tasks/main.yml +++ b/roles/matrix/tasks/main.yml @@ -28,7 +28,6 @@ with_items: - "{{ matrix_database_location }}" - "{{ matrix_data_location }}" - - "{{ matrix_elementweb_location }}" when: - matrix_selinux_enabled become: true @@ -52,7 +51,6 @@ with_items: - "{{ matrix_database_location }}" - "{{ matrix_data_location }}" - - "{{ matrix_elementweb_location }}" become: true - name: Deploy docker-compose.yml @@ -97,19 +95,6 @@ notify: restart matrix delegate nginx become: true -- name: Deploy Element-Web config files - template: - src: "elementweb-config.json" - dest: "{{ matrix_elementweb_location }}/config.json" - setype: "container_file_t" - mode: '0644' - owner: '991' - group: '991' - tags: - - docker - - matrix - become: true - - name: Check if homeserver.yaml (config) exists stat: path: "{{ matrix_data_location }}/homeserver.yaml" diff --git a/roles/matrix/templates/docker-compose.yml b/roles/matrix/templates/docker-compose.yml index 1f20d6a..2c9b550 100644 --- a/roles/matrix/templates/docker-compose.yml +++ b/roles/matrix/templates/docker-compose.yml @@ -128,42 +128,6 @@ services: {{ proxy_network }}: {% endif %} - elementweb: - image: docker.io/vectorim/element-web:{{ matrix_elementweb_image_version }} - mem_limit: 512mb - memswap_limit: 768mb - read_only: true - security_opt: - - no-new-privileges - tmpfs: - - "/var/cache/nginx:size=10M" - - "/run:size=512K" - - "/tmp:rw,noexec,nosuid,size=10M" - labels: - - "traefik.enable=true" - - - "traefik.http.routers.matrix-elementweb.rule=Host(`{{ matrix_elementweb_domain }}`) && PathPrefix(`/`)" - - "traefik.http.routers.matrix-elementweb.entrypoints=websecure" - - "traefik.http.routers.matrix-elementweb.tls.certresolver={{ matrix_traefik_certresolver }}" - - "traefik.http.routers.matrix-elementweb.middlewares=matrix-elementweb,compress" - - "traefik.http.middlewares.matrix-elementweb.headers.sslredirect=true" - - "traefik.http.middlewares.matrix-elementweb.headers.stsSeconds=63072000" - - "traefik.http.middlewares.matrix-elementweb.headers.referrerPolicy=no-referrer" - -{% if proxy_network is defined %} - - "traefik.docker.network={{ proxy_network }}" -{% endif %} -{% if proxy_hiddenservice is defined and proxy_hiddenservice.content is defined %} - - "traefik.http.middlewares.matrix-elementweb.headers.customresponseheaders.alt-svc:h2={{ proxy_hiddenservice['content'] | b64decode | trim }}:443; ma=2592000" -{% endif %} - volumes: - - "{{ matrix_elementweb_location }}/config.json:/app/config.json:ro" -{% if proxy_network is defined %} - networks: - {{ proxy_network }}: -{% endif %} - restart: always - networks: database: internal: true diff --git a/roles/matrix/templates/elementweb-config.json b/roles/matrix/templates/elementweb-config.json deleted file mode 100644 index 0819300..0000000 --- a/roles/matrix/templates/elementweb-config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "default_server_config": { - "m.homeserver": { - "base_url": {{ matrix_elementweb_base_url | string | to_json }}, - "server_name": {{ matrix_elementweb_servername | string | to_json }} - } - }, - "disable_custom_urls": {{ matrix_elementweb_disable_custom_urls | to_json }}, - "disable_3pid_login": {{ matrix_elementweb_disable_3pid_login | to_json }}, - "disable_guests": {{ matrix_elementweb_disable_guests | to_json }}, - "integrations_ui_url": {{ matrix_elementweb_integrations_ui_url | string | to_json }}, - "integrations_rest_url": {{ matrix_elementweb_integrations_rest_url | string | to_json }}, - "integrations_widgets_urls": {{ matrix_elementweb_integrations_widgets_urls | to_json }}, - "integrations_jitsi_widget_url": {{ matrix_elementweb_integrations_jitsi_widget_url | string | to_json }}, - "bug_report_endpoint_url": "https://element.io/bugreports/submit", - "enableLabs": true, -{% if matrix_elementweb_enable_presence_by_hs_url %} - "enable_presence_by_hs_url": {{ matrix_elementweb_enable_presence_by_hs_url | to_json }}, -{% endif %} - "roomDirectory": { - "servers": {{ matrix_elementweb_roomdir_servers | to_json }} - } -}