This will make data migration easier.pull/870/head
| @@ -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_access_key: "your-aws-access-key" | ||||
| matrix_s3_media_store_aws_secret_key: "your-aws-secret-key" | matrix_s3_media_store_aws_secret_key: "your-aws-secret-key" | ||||
| matrix_s3_media_store_region: "eu-central-1" | 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. | # Controls whether the self-check feature should validate SSL certificates. | ||||
| matrix_synapse_self_check_validate_certificates: true | matrix_synapse_self_check_validate_certificates: true | ||||
| @@ -8,18 +8,18 @@ | |||||
| # This will throw a Permission Denied error if already mounted | # This will throw a Permission Denied error if already mounted | ||||
| - name: Check Matrix Goofys external storage mountpoint path | - name: Check Matrix Goofys external storage mountpoint path | ||||
| stat: | 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 | ignore_errors: yes | ||||
| - name: Ensure Matrix Goofys external storage mountpoint exists | - name: Ensure Matrix Goofys external storage mountpoint exists | ||||
| file: | file: | ||||
| path: "{{ matrix_synapse_media_store_path }}" | |||||
| path: "{{ matrix_s3_media_store_path }}" | |||||
| state: directory | state: directory | ||||
| mode: 0750 | mode: 0750 | ||||
| owner: "{{ matrix_user_username }}" | owner: "{{ matrix_user_username }}" | ||||
| group: "{{ matrix_user_groupname }}" | 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 | - name: Ensure goofys environment variables file created | ||||
| template: | template: | ||||
| @@ -16,7 +16,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name %n \ | |||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| --mount type=bind,src=/etc/passwd,dst=/etc/passwd,ro \ | --mount type=bind,src=/etc/passwd,dst=/etc/passwd,ro \ | ||||
| --mount type=bind,src=/etc/group,dst=/etc/group,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 \ | --security-opt apparmor:unconfined \ | ||||
| --cap-add mknod \ | --cap-add mknod \ | ||||
| --cap-add sys_admin \ | --cap-add sys_admin \ | ||||
| @@ -30,7 +30,7 @@ TimeoutStartSec=5min | |||||
| ExecStop=-{{ matrix_host_command_docker }} stop %n | ExecStop=-{{ matrix_host_command_docker }} stop %n | ||||
| ExecStop=-{{ matrix_host_command_docker }} kill %n | ExecStop=-{{ matrix_host_command_docker }} kill %n | ||||
| ExecStop=-{{ matrix_host_command_docker }} rm %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 | Restart=always | ||||
| RestartSec=5 | RestartSec=5 | ||||
| SyslogIdentifier=matrix-goofys | SyslogIdentifier=matrix-goofys | ||||