| @@ -83,21 +83,21 @@ You need to enable it in the config as followed: | |||||
| ```yaml | ```yaml | ||||
| # To enable the Module | # To enable the Module | ||||
| matrix_synapse_s3_media_store_enabled: true | |||||
| matrix_synapse_media_storage_provider_s3_enabled: true | |||||
| # Connection information | # Connection information | ||||
| matrix_synapse_s3_media_store_bucket: "" | |||||
| matrix_synapse_s3_media_store_access: "" | |||||
| matrix_synapse_s3_media_store_key: "" | |||||
| matrix_synapse_media_storage_provider_s3_bucket: "" | |||||
| matrix_synapse_media_storage_provider_s3_access_key_id: "" | |||||
| matrix_synapse_media_storage_provider_s3_secret_access_key: "" | |||||
| ``` | ``` | ||||
| For Amazon S3 Users you can set the S3 region with the key: | For Amazon S3 Users you can set the S3 region with the key: | ||||
| ```yaml | ```yaml | ||||
| # To set the S3 Region. Default value is eu-central-1 | # To set the S3 Region. Default value is eu-central-1 | ||||
| matrix_synapse_s3_media_store_region: "eu-central-1" | |||||
| matrix_synapse_s3_media_store_region_name: "eu-central-1" | |||||
| ``` | ``` | ||||
| The set a custom S3 Endpoint (MinIO): | The set a custom S3 Endpoint (MinIO): | ||||
| ```yaml | ```yaml | ||||
| # To set the S3 Endpoint URL. Defaults to AmazonS3 | # To set the S3 Endpoint URL. Defaults to AmazonS3 | ||||
| matrix_synapse_s3_media_store_endpoint: "https://..." | |||||
| matrix_synapse_s3_media_store_endpoint_url: "https://..." | |||||
| ``` | ``` | ||||
| @@ -577,23 +577,23 @@ matrix_synapse_ext_encryption_config_yaml: | | |||||
| # The S3 Integration requires the installation directly in the Synapse container. | # The S3 Integration requires the installation directly in the Synapse container. | ||||
| # So there is a need to build our own Synapse container. | # So there is a need to build our own Synapse container. | ||||
| # So with setting matrix_synapse_s3_media_store_enabled to true the matrix_synapse_container_image_self_build is overwritten. | |||||
| # So with setting matrix_synapse_media_storage_provider_s3_enabled to true the matrix_synapse_container_image_self_build is overwritten. | |||||
| # All configuration options are avaliable here: https://github.com/matrix-org/synapse-s3-storage-provider | # All configuration options are avaliable here: https://github.com/matrix-org/synapse-s3-storage-provider | ||||
| matrix_synapse_s3_media_store_enabled: false | |||||
| matrix_synapse_media_storage_provider_s3_enabled: false | |||||
| # Save media on local media store | # Save media on local media store | ||||
| matrix_synapse_s3_media_store_local: false | |||||
| matrix_synapse_media_storage_provider_s3_store_local: false | |||||
| # Save media on remote media store | # Save media on remote media store | ||||
| matrix_synapse_s3_media_store_remote: true | |||||
| matrix_synapse_media_storage_provider_s3_store_remote: true | |||||
| # Synchronous upload | # Synchronous upload | ||||
| matrix_synapse_s3_media_store_sync: false | |||||
| matrix_synapse_s3_media_store_bucket: "" | |||||
| matrix_synapse_s3_media_store_region: "eu-central-1" | |||||
| matrix_synapse_s3_media_store_endpoint: "https://s3.{{ matrix_synapse_s3_media_store_region }}.amazonaws.com" | |||||
| matrix_synapse_s3_media_store_access: "" | |||||
| matrix_synapse_s3_media_store_key: "" | |||||
| matrix_synapse_s3_media_store_storage_class: "STANDARD" | |||||
| matrix_synapse_s3_media_store_threads: "20" | |||||
| matrix_synapse_media_storage_provider_s3_store_synchronous: false | |||||
| matrix_synapse_media_storage_provider_s3_bucket: "" | |||||
| matrix_synapse_media_storage_provider_s3_region_name: "eu-central-1" | |||||
| matrix_synapse_media_storage_provider_s3_endpoint_url: "https://s3.{{ matrix_synapse_media_storage_provider_s3_region }}.amazonaws.com" | |||||
| matrix_synapse_media_storage_provider_s3_access_key_id: "" | |||||
| matrix_synapse_media_storage_provider_s3_secret_access_key: "" | |||||
| matrix_synapse_media_storage_provider_s3_storage_class: "STANDARD" | |||||
| matrix_synapse_media_storage_provider_s3_threadpool_size: "20" | |||||
| # Goofys S3 Integration | # Goofys S3 Integration | ||||
| @@ -40,7 +40,7 @@ | |||||
| path: "{{ matrix_synapse_docker_src_files_path }}/docker/Dockerfile" | path: "{{ matrix_synapse_docker_src_files_path }}/docker/Dockerfile" | ||||
| line: RUN pip install --no-deps --no-warn-script-location synapse-s3-storage-provider boto3 botocore humanize jmespath s3transfer tqdm typing-extensions | line: RUN pip install --no-deps --no-warn-script-location synapse-s3-storage-provider boto3 botocore humanize jmespath s3transfer tqdm typing-extensions | ||||
| insertafter: /synapse.* | insertafter: /synapse.* | ||||
| when: "matrix_synapse_s3_media_store_enabled|bool" | |||||
| when: "matrix_synapse_media_storage_provider_s3_enabled|bool" | |||||
| # Invoking the `docker build` command here, instead of calling the `docker_image` Ansible module, | # Invoking the `docker build` command here, instead of calling the `docker_image` Ansible module, | ||||
| # because the latter does not support BuildKit. | # because the latter does not support BuildKit. | ||||
| @@ -56,7 +56,7 @@ | |||||
| environment: | environment: | ||||
| DOCKER_BUILDKIT: 1 | DOCKER_BUILDKIT: 1 | ||||
| when: "matrix_synapse_git_pull_results.changed|bool or matrix_synapse_docker_image_check_result.stdout == ''" | when: "matrix_synapse_git_pull_results.changed|bool or matrix_synapse_docker_image_check_result.stdout == ''" | ||||
| when: "matrix_synapse_container_image_self_build|bool or matrix_synapse_s3_media_store_enabled|bool" | |||||
| when: "matrix_synapse_container_image_self_build|bool" | |||||
| - name: Ensure Synapse Docker image is pulled | - name: Ensure Synapse Docker image is pulled | ||||
| docker_image: | docker_image: | ||||
| @@ -1040,24 +1040,24 @@ media_store_path: "/matrix-media-store-parent/{{ matrix_synapse_media_store_dire | |||||
| # directory: /mnt/some/other/directory | # directory: /mnt/some/other/directory | ||||
| # Matrix S3 Storage Provider | # Matrix S3 Storage Provider | ||||
| {% if matrix_synapse_s3_media_store_enabled %} | |||||
| {% if matrix_synapse_media_storage_provider_s3_enabled %} | |||||
| media_storage_providers: | media_storage_providers: | ||||
| - module: s3_storage_provider.S3StorageProviderBackend | - module: s3_storage_provider.S3StorageProviderBackend | ||||
| # In the context of this module the local store means the S3 Bucket | # In the context of this module the local store means the S3 Bucket | ||||
| # and the remote store the local volume ¯\_(ツ)_/¯ (i swaped it for convenience) | # and the remote store the local volume ¯\_(ツ)_/¯ (i swaped it for convenience) | ||||
| store_local: {{ matrix_synapse_s3_media_store_remote }} | |||||
| store_remote: {{ matrix_synapse_s3_media_store_local }} | |||||
| store_synchronous: {{ matrix_synapse_s3_media_store_sync }} | |||||
| store_local: {{ matrix_synapse_media_storage_provider_s3_store_local }} | |||||
| store_remote: {{ matrix_synapse_media_storage_provider_s3_store_remote }} | |||||
| store_synchronous: {{ matrix_synapse_media_storage_provider_s3_store_synchronous }} | |||||
| config: | config: | ||||
| bucket: {{ matrix_synapse_s3_media_store_bucket }} | |||||
| bucket: {{ matrix_synapse_media_storage_provider_s3_bucket }} | |||||
| # All of the below options are optional, for use with non-AWS S3-like | # All of the below options are optional, for use with non-AWS S3-like | ||||
| # services, or to specify access tokens here instead of some external method. | # services, or to specify access tokens here instead of some external method. | ||||
| region_name: {{ matrix_synapse_s3_media_store_region }} | |||||
| endpoint_url: {{ matrix_synapse_s3_media_store_endpoint }} | |||||
| access_key_id: {{ matrix_synapse_s3_media_store_access }} | |||||
| secret_access_key: {{ matrix_synapse_s3_media_store_key }} | |||||
| region_name: {{ matrix_synapse_media_storage_provider_s3_region_name }} | |||||
| endpoint_url: {{ matrix_synapse_media_storage_provider_s3_endpoint_url }} | |||||
| access_key_id: {{ matrix_synapse_media_storage_provider_s3_access_key_id }} | |||||
| secret_access_key: {{ matrix_synapse_media_storage_provider_s3_secret_access_key }} | |||||
| storage_class: {{ matrix_synapse_s3_media_store_storage_class }} | storage_class: {{ matrix_synapse_s3_media_store_storage_class }} | ||||
| threadpool_size: {{ matrix_synapse_s3_media_store_threads }} | |||||
| threadpool_size: {{ matrix_synapse_media_storage_provider_s3_threadpool_size }} | |||||
| {% endif %} | {% endif %} | ||||
| # The largest allowed upload size in bytes | # The largest allowed upload size in bytes | ||||