Changed volume mounting and directory structure
This commit is contained in:
parent
b9f5aa0344
commit
ecb24dcaab
|
@ -17,6 +17,8 @@ matrix_media_repo_docker_image_tag: "v1.2.13"
|
||||||
matrix_media_repo_docker_image_force_pull: "{{ matrix_media_repo_docker_image.endswith(':latest') }}"
|
matrix_media_repo_docker_image_force_pull: "{{ matrix_media_repo_docker_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_media_repo_base_path: "{{ matrix_base_data_path }}/media-repo"
|
matrix_media_repo_base_path: "{{ matrix_base_data_path }}/media-repo"
|
||||||
|
matrix_media_repo_config_path: "{{ matrix_media_repo_base_path }}/config"
|
||||||
|
matrix_media_repo_data_path: "{{ matrix_media_repo_base_path }}/data"
|
||||||
matrix_media_repo_docker_src_files_path: "{{ matrix_media_repo_base_path }}/docker-src"
|
matrix_media_repo_docker_src_files_path: "{{ matrix_media_repo_base_path }}/docker-src"
|
||||||
|
|
||||||
# List of systemd services that matrix-conduit.service depends on
|
# List of systemd services that matrix-conduit.service depends on
|
||||||
|
|
|
@ -10,14 +10,28 @@
|
||||||
with_items:
|
with_items:
|
||||||
- path: "{{ matrix_media_repo_base_path }}"
|
- path: "{{ matrix_media_repo_base_path }}"
|
||||||
when: true
|
when: true
|
||||||
|
- path: "{{ matrix_media_repo_config_path }}"
|
||||||
|
when: true
|
||||||
|
- path: "{{ matrix_media_repo_data_path }}"
|
||||||
|
when: true
|
||||||
- path: "{{ matrix_media_repo_docker_src_files_path }}"
|
- path: "{{ matrix_media_repo_docker_src_files_path }}"
|
||||||
when: "{{ matrix_media_repo_container_image_self_build }}"
|
when: "{{ matrix_media_repo_container_image_self_build }}"
|
||||||
when: "item.when | bool"
|
when: "item.when | bool"
|
||||||
|
|
||||||
|
- name: Ensure media-repo support files installed
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "{{ role_path }}/templates/media-repo/{{ item }}.j2"
|
||||||
|
dest: "{{ matrix_media_repo_base_path }}/{{ item }}"
|
||||||
|
mode: 0640
|
||||||
|
owner: "{{ matrix_user_username }}"
|
||||||
|
group: "{{ matrix_user_groupname }}"
|
||||||
|
with_items:
|
||||||
|
- env
|
||||||
|
|
||||||
- name: Ensure media-repo configuration installed
|
- name: Ensure media-repo configuration installed
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/media-repo/media-repo.yaml.j2"
|
src: "{{ role_path }}/templates/media-repo/media-repo.yaml.j2"
|
||||||
dest: "{{ matrix_media_repo_base_path }}/media-repo.yaml"
|
dest: "{{ matrix_media_repo_config_path }}/media-repo.yaml"
|
||||||
mode: 0640
|
mode: 0640
|
||||||
owner: "{{ matrix_user_username }}"
|
owner: "{{ matrix_user_username }}"
|
||||||
group: "{{ matrix_user_groupname }}"
|
group: "{{ matrix_user_groupname }}"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
REPO_CONFIG=/config/media-repo.yaml
|
|
@ -23,13 +23,15 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||||
--cap-drop=ALL \
|
--cap-drop=ALL \
|
||||||
--network={{ matrix_docker_network }} \
|
--network={{ matrix_docker_network }} \
|
||||||
|
--env-file={{ matrix_media_repo_base_path }}/env \
|
||||||
{% if matrix_media_repo_container_http_host_bind_port %}
|
{% if matrix_media_repo_container_http_host_bind_port %}
|
||||||
-p {{ matrix_media_repo_container_http_host_bind_port }}:{{ matrix_media_repo_port }} \
|
-p {{ matrix_media_repo_container_http_host_bind_port }}:{{ matrix_media_repo_port }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if matrix_media_repo_metrics_enabled and matrix_media_repo_container_metrics_host_bind_port %}
|
{% if matrix_media_repo_metrics_enabled and matrix_media_repo_container_metrics_host_bind_port %}
|
||||||
-p {{ matrix_media_repo_container_metrics_host_bind_port }}:{{ matrix_media_repo_metrics_port }} \
|
-p {{ matrix_media_repo_container_metrics_host_bind_port }}:{{ matrix_media_repo_metrics_port }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
-v {{ matrix_media_repo_base_path }}:/data:z \
|
--mount type=bind,src={{ matrix_media_repo_config_path }},dst=/config,ro \
|
||||||
|
--mount type=bind,src={{ matrix_media_repo_data_path }},dst=/data \
|
||||||
--workdir='/data' \
|
--workdir='/data' \
|
||||||
--entrypoint='media_repo' \
|
--entrypoint='media_repo' \
|
||||||
{% for arg in matrix_media_repo_container_extra_arguments %}
|
{% for arg in matrix_media_repo_container_extra_arguments %}
|
||||||
|
|
Loading…
Reference in a new issue