mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-10 12:47:39 +01:00
Make S3-mounting path configurable
This will make data migration easier.
This commit is contained in:
parent
21fd44a557
commit
7e8e95a09a
@ -354,6 +354,7 @@ matrix_s3_media_store_bucket_name: "your-bucket-name"
|
||||
matrix_s3_media_store_aws_access_key: "your-aws-access-key"
|
||||
matrix_s3_media_store_aws_secret_key: "your-aws-secret-key"
|
||||
matrix_s3_media_store_region: "eu-central-1"
|
||||
matrix_s3_media_store_path: "{{ matrix_synapse_media_store_path }}"
|
||||
|
||||
# Controls whether the self-check feature should validate SSL certificates.
|
||||
matrix_synapse_self_check_validate_certificates: true
|
||||
|
@ -8,18 +8,18 @@
|
||||
# This will throw a Permission Denied error if already mounted
|
||||
- name: Check Matrix Goofys external storage mountpoint path
|
||||
stat:
|
||||
path: "{{ matrix_synapse_media_store_path }}"
|
||||
register: local_path_matrix_synapse_media_store_path_stat
|
||||
path: "{{ matrix_s3_media_store_path }}"
|
||||
register: local_path_matrix_s3_media_store_path_stat
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Ensure Matrix Goofys external storage mountpoint exists
|
||||
file:
|
||||
path: "{{ matrix_synapse_media_store_path }}"
|
||||
path: "{{ matrix_s3_media_store_path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
when: "not local_path_matrix_synapse_media_store_path_stat.failed and not local_path_matrix_synapse_media_store_path_stat.stat.exists"
|
||||
when: "not local_path_matrix_s3_media_store_path_stat.failed and not local_path_matrix_s3_media_store_path_stat.stat.exists"
|
||||
|
||||
- name: Ensure goofys environment variables file created
|
||||
template:
|
||||
|
@ -16,7 +16,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name %n \
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||
--mount type=bind,src=/etc/passwd,dst=/etc/passwd,ro \
|
||||
--mount type=bind,src=/etc/group,dst=/etc/group,ro \
|
||||
--mount type=bind,src={{ matrix_synapse_media_store_path }},dst=/s3,bind-propagation=shared \
|
||||
--mount type=bind,src={{ matrix_s3_media_store_path }},dst=/s3,bind-propagation=shared \
|
||||
--security-opt apparmor:unconfined \
|
||||
--cap-add mknod \
|
||||
--cap-add sys_admin \
|
||||
@ -30,7 +30,7 @@ TimeoutStartSec=5min
|
||||
ExecStop=-{{ matrix_host_command_docker }} stop %n
|
||||
ExecStop=-{{ matrix_host_command_docker }} kill %n
|
||||
ExecStop=-{{ matrix_host_command_docker }} rm %n
|
||||
ExecStop=-{{ matrix_host_command_fusermount }} -u {{ matrix_synapse_media_store_path }}
|
||||
ExecStop=-{{ matrix_host_command_fusermount }} -u {{ matrix_s3_media_store_path }}
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
SyslogIdentifier=matrix-goofys
|
||||
|
Loading…
Reference in New Issue
Block a user