Use upstream Docker image for amd64 rather than self-build

This commit is contained in:
Matthew Cengia 2022-12-11 21:25:43 +11:00
parent 905ffd091e
commit 3453fff901
No known key found for this signature in database
GPG Key ID: 652968EE25069D6F
5 changed files with 8 additions and 10 deletions

View File

@ -2658,6 +2658,8 @@ matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matr
matrix_client_hydrogen_enabled: false matrix_client_hydrogen_enabled: false
matrix_client_hydrogen_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
# Normally, matrix-nginx-proxy is enabled and nginx can reach Hydrogen over the container network. # Normally, matrix-nginx-proxy is enabled and nginx can reach Hydrogen over the container network.
# If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
# the HTTP port to the local host. # the HTTP port to the local host.

View File

@ -3,14 +3,12 @@
matrix_client_hydrogen_enabled: true matrix_client_hydrogen_enabled: true
# Self building is used by default because the `config.json` file is only read at build time. matrix_client_hydrogen_container_image_self_build: false
# The pre-built images also were not functional as of 2021-05-15.
matrix_client_hydrogen_container_image_self_build: true
matrix_client_hydrogen_container_image_self_build_repo: "https://github.com/vector-im/hydrogen-web.git" matrix_client_hydrogen_container_image_self_build_repo: "https://github.com/vector-im/hydrogen-web.git"
matrix_client_hydrogen_version: v0.3.5 matrix_client_hydrogen_version: v0.3.5
matrix_client_hydrogen_docker_image: "{{ matrix_client_hydrogen_docker_image_name_prefix }}vectorim/hydrogen-web:{{ matrix_client_hydrogen_version }}" matrix_client_hydrogen_docker_image: "{{ matrix_client_hydrogen_docker_image_name_prefix }}vector-im/hydrogen-web:{{ matrix_client_hydrogen_version }}"
matrix_client_hydrogen_docker_image_name_prefix: "{{ 'localhost/' if matrix_client_hydrogen_container_image_self_build else matrix_container_global_registry_prefix }}" matrix_client_hydrogen_docker_image_name_prefix: "{{ 'localhost/' if matrix_client_hydrogen_container_image_self_build else 'ghcr.io/' }}"
matrix_client_hydrogen_docker_image_force_pull: "{{ matrix_client_hydrogen_docker_image.endswith(':latest') }}" matrix_client_hydrogen_docker_image_force_pull: "{{ matrix_client_hydrogen_docker_image.endswith(':latest') }}"
matrix_client_hydrogen_data_path: "{{ matrix_base_data_path }}/client-hydrogen" matrix_client_hydrogen_data_path: "{{ matrix_base_data_path }}/client-hydrogen"

View File

@ -38,11 +38,10 @@
- name: Ensure Hydrogen configuration installed - name: Ensure Hydrogen configuration installed
ansible.builtin.copy: ansible.builtin.copy:
content: "{{ matrix_client_hydrogen_configuration | to_nice_json }}" content: "{{ matrix_client_hydrogen_configuration | to_nice_json }}"
dest: "{{ matrix_client_hydrogen_docker_src_files_path }}/src/platform/web/assets/config.json" dest: "{{ matrix_client_hydrogen_data_path }}/config.json"
mode: 0644 mode: 0644
owner: "{{ matrix_user_username }}" owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}" group: "{{ matrix_user_groupname }}"
when: "matrix_client_hydrogen_container_image_self_build | bool"
- name: Ensure Hydrogen additional config files installed - name: Ensure Hydrogen additional config files installed
ansible.builtin.template: ansible.builtin.template:
@ -55,8 +54,6 @@
- {src: "{{ role_path }}/templates/nginx.conf.j2", name: "nginx.conf"} - {src: "{{ role_path }}/templates/nginx.conf.j2", name: "nginx.conf"}
when: "item.src is not none" when: "item.src is not none"
# This step MUST come after the steps to install the configuration files because the config files
# are currently only read at build time, not at run time like most other components in the playbook
- name: Ensure Hydrogen Docker image is built - name: Ensure Hydrogen Docker image is built
community.docker.docker_image: community.docker.docker_image:
name: "{{ matrix_client_hydrogen_docker_image }}" name: "{{ matrix_client_hydrogen_docker_image }}"

View File

@ -3,7 +3,7 @@
"defaultHomeServer": {{ matrix_client_hydrogen_default_hs_url | string | to_json }}, "defaultHomeServer": {{ matrix_client_hydrogen_default_hs_url | string | to_json }},
"bugReportEndpointUrl": {{ matrix_client_hydrogen_bugReportEndpointUrl | to_json }}, "bugReportEndpointUrl": {{ matrix_client_hydrogen_bugReportEndpointUrl | to_json }},
"themeManifests": [ "themeManifests": [
"assets/theme-Element.json" "assets/theme-element.json"
], ],
"defaultTheme": { "defaultTheme": {
"light": "element-light", "light": "element-light",

View File

@ -24,6 +24,7 @@ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name
{% endif %} {% endif %}
--tmpfs=/tmp:rw,noexec,nosuid,size=10m \ --tmpfs=/tmp:rw,noexec,nosuid,size=10m \
--mount type=bind,src={{ matrix_client_hydrogen_data_path }}/nginx.conf,dst=/etc/nginx/nginx.conf,ro \ --mount type=bind,src={{ matrix_client_hydrogen_data_path }}/nginx.conf,dst=/etc/nginx/nginx.conf,ro \
--mount type=bind,src={{ matrix_client_hydrogen_data_path }}/config.json,dst=/usr/share/nginx/html/config.json,ro \
{% for arg in matrix_client_hydrogen_container_extra_arguments %} {% for arg in matrix_client_hydrogen_container_extra_arguments %}
{{ arg }} \ {{ arg }} \
{% endfor %} {% endfor %}