diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index 45366b0f264..6569e617231 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -1231,7 +1231,7 @@ matrix_synapse_ext_encryption_config_yaml: | # Installing it requires building a customized Docker image for Synapse (see `matrix_synapse_container_image_customizations_enabled`). # Enabling this will enable customizations and inject the appropriate Dockerfile clauses for installing synapse-s3-storage-provider. matrix_synapse_ext_synapse_s3_storage_provider_enabled: false -matrix_synapse_ext_synapse_s3_storage_provider_version: 1.3.0 +matrix_synapse_ext_synapse_s3_storage_provider_version: 1.5.0 # Controls whether media from this (local) server is stored in s3-storage-provider matrix_synapse_ext_synapse_s3_storage_provider_store_local: true # Controls whether media from remote servers is stored in s3-storage-provider @@ -1242,6 +1242,10 @@ matrix_synapse_ext_synapse_s3_storage_provider_store_remote: true # because the local filesystem is a reliable data store anyway. matrix_synapse_ext_synapse_s3_storage_provider_store_synchronous: false matrix_synapse_ext_synapse_s3_storage_provider_config_bucket: '' +# Prefix for all media in bucket, can't be changed once media has been uploaded. +# Useful if sharing the bucket between Synapses +# Example value: prefix/to/files/in/bucket +matrix_synapse_ext_synapse_s3_storage_provider_config_prefix: '' matrix_synapse_ext_synapse_s3_storage_provider_config_region_name: '' matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url: '' matrix_synapse_ext_synapse_s3_storage_provider_config_access_key_id: '' diff --git a/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/env.j2 b/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/env.j2 index 227fd89e4e5..e50bf7e54dd 100644 --- a/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/env.j2 +++ b/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/env.j2 @@ -7,6 +7,10 @@ AWS_DEFAULT_REGION={{ matrix_synapse_ext_synapse_s3_storage_provider_config_regi ENDPOINT={{ matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url }} BUCKET={{ matrix_synapse_ext_synapse_s3_storage_provider_config_bucket }} +{% if matrix_synapse_ext_synapse_s3_storage_provider_config_prefix %} +PREFIX={{ matrix_synapse_ext_synapse_s3_storage_provider_config_prefix }} +{% endif %} + {% if matrix_synapse_ext_synapse_s3_storage_provider_config_sse_customer_enabled %} SSE_CUSTOMER_KEY={{ matrix_synapse_ext_synapse_s3_storage_provider_config_sse_customer_key }} SSE_CUSTOMER_ALGO={{ matrix_synapse_ext_synapse_s3_storage_provider_config_sse_customer_algo }}