Add self-build for Dimension
Add a self-build option for the Dimension Dockerfile. - This helps further support arm64 hosts (i.e. A1.Flex w/Oracle)
This commit is contained in:
@ -10,10 +10,16 @@ matrix_dimension_admins: []
|
||||
# Whether to allow Dimension widgets serve websites with invalid or self signed SSL certificates
|
||||
matrix_dimension_widgets_allow_self_signed_ssl_certificates: false
|
||||
|
||||
matrix_dimension_container_image_self_build: false
|
||||
matrix_dimension_container_image_self_build_repo: "https://github.com/turt2live/matrix-dimension.git"
|
||||
matrix_dimension_container_image_self_build_branch: master
|
||||
|
||||
matrix_dimension_base_path: "{{ matrix_base_data_path }}/dimension"
|
||||
matrix_dimension_docker_src_files_path: "{{ matrix_base_data_path }}/docker-src/dimension"
|
||||
|
||||
matrix_dimension_version: latest
|
||||
matrix_dimension_docker_image: "{{ matrix_container_global_registry_prefix }}turt2live/matrix-dimension:{{ matrix_dimension_version }}"
|
||||
matrix_dimension_docker_image: "{{ matrix_dimension_docker_image_name_prefix }}turt2live/matrix-dimension:{{ matrix_dimension_version }}"
|
||||
matrix_dimension_docker_image_name_prefix: "{{ 'localhost/' if matrix_dimension_container_image_self_build else matrix_container_global_registry_prefix }}"
|
||||
matrix_dimension_docker_image_force_pull: "{{ matrix_dimension_docker_image.endswith(':latest') }}"
|
||||
|
||||
# List of systemd services that matrix-dimension.service depends on.
|
||||
|
@ -90,6 +90,29 @@
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_dimension_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
||||
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_dimension_docker_image_force_pull }}"
|
||||
when: "not matrix_dimension_container_image_self_build|bool"
|
||||
register: matrix_dimension_pull_results
|
||||
|
||||
- name: Ensure dimension repository is present on self-build
|
||||
git:
|
||||
repo: "{{ matrix_dimension_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_dimension_docker_src_files_path }}"
|
||||
version: "{{ matrix_dimension_container_image_self_build_branch }}"
|
||||
force: "yes"
|
||||
when: "matrix_dimension_container_image_self_build|bool"
|
||||
register: matrix_dimension_git_pull_results
|
||||
|
||||
- name: Ensure Dimension Docker image is built
|
||||
docker_image:
|
||||
name: "{{ matrix_dimension_docker_image }}"
|
||||
source: build
|
||||
force_source: "{{ matrix_dimension_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
||||
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_dimension_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_dimension_docker_src_files_path }}"
|
||||
pull: yes
|
||||
when: "matrix_dimension_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure matrix-dimension.service installed
|
||||
template:
|
||||
|
Reference in New Issue
Block a user