From c4b6abaeda89c0a12a162c1a127769c7ef1638b9 Mon Sep 17 00:00:00 2001 From: Tiago Carrondo Date: Sat, 27 Jan 2024 09:37:42 +0000 Subject: [PATCH] Fix s3-storage migrate and shell: container needs attachment to postgres network also --- .../templates/synapse/ext/s3-storage-provider/bin/migrate.j2 | 1 + .../templates/synapse/ext/s3-storage-provider/bin/shell.j2 | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/bin/migrate.j2 b/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/bin/migrate.j2 index 5c3a534b5..6e6aa7698 100644 --- a/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/bin/migrate.j2 +++ b/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/bin/migrate.j2 @@ -8,6 +8,7 @@ --mount type=bind,src={{ matrix_synapse_ext_s3_storage_provider_data_path }},dst=/data \ --workdir=/data \ --network={{ matrix_synapse_container_network }} \ + --network={{ devture_postgres_container_network }} \ --entrypoint=/bin/bash \ {{ matrix_synapse_docker_image_final }} \ -c 's3_media_upload update-db $UPDATE_DB_DURATION && s3_media_upload --no-progress check-deleted $MEDIA_PATH && s3_media_upload --no-progress upload $MEDIA_PATH $BUCKET --delete --storage-class $STORAGE_CLASS --endpoint-url $ENDPOINT {% if matrix_synapse_ext_synapse_s3_storage_provider_config_sse_customer_enabled %}--sse-customer-algo $SSE_CUSTOMER_ALGO --sse-customer-key $SSE_CUSTOMER_KEY{% endif %}' diff --git a/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/bin/shell.j2 b/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/bin/shell.j2 index 6f3804cc4..7ca439755 100644 --- a/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/bin/shell.j2 +++ b/roles/custom/matrix-synapse/templates/synapse/ext/s3-storage-provider/bin/shell.j2 @@ -9,5 +9,6 @@ --mount type=bind,src={{ matrix_synapse_ext_s3_storage_provider_data_path }},dst=/data \ --workdir=/data \ --network={{ matrix_synapse_container_network }} \ + --network={{ devture_postgres_container_network }} \ --entrypoint=/bin/bash \ {{ matrix_synapse_docker_image_final }}