aboutsummaryrefslogtreecommitdiff
path: root/app/im/build
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-09-17 18:49:45 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-09-17 18:49:45 +0200
commit136d1761766e94c502f4d18dba8b16422e62d159 (patch)
tree3741c1f2adf776e10d5ba047781f7b02914b7161 /app/im/build
parent2a0610658d9875b24faf74c8ad7a12d17ab5d745 (diff)
downloadinfrastructure-136d1761766e94c502f4d18dba8b16422e62d159.tar.gz
infrastructure-136d1761766e94c502f4d18dba8b16422e62d159.zip
Synapse does not use GlusterFS anymore
Diffstat (limited to 'app/im/build')
-rw-r--r--app/im/build/matrix-synapse/Dockerfile1
-rwxr-xr-xapp/im/build/matrix-synapse/matrix-s3-async16
2 files changed, 17 insertions, 0 deletions
diff --git a/app/im/build/matrix-synapse/Dockerfile b/app/im/build/matrix-synapse/Dockerfile
index 48cf2c7..d410779 100644
--- a/app/im/build/matrix-synapse/Dockerfile
+++ b/app/im/build/matrix-synapse/Dockerfile
@@ -46,6 +46,7 @@ RUN apt-get update && \
ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjemalloc.so.2
COPY --from=builder /root/matrix-env /root/matrix-env
+COPY matrix-s3-async /usr/local/bin/matrix-s3-async
COPY entrypoint.sh /usr/local/bin/entrypoint
ENTRYPOINT ["/usr/local/bin/entrypoint"]
diff --git a/app/im/build/matrix-synapse/matrix-s3-async b/app/im/build/matrix-synapse/matrix-s3-async
new file mode 100755
index 0000000..e435144
--- /dev/null
+++ b/app/im/build/matrix-synapse/matrix-s3-async
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+cat > database.yaml <<EOF
+user: $PG_USER
+password: $PG_PASS
+database: $PG_DB
+host: $PG_HOST
+port: $PG_PORT
+EOF
+
+while true; do
+ /root/matrix-env/bin/s3_media_upload update-db 0d
+ /root/matrix-env/bin/s3_media_upload --no-progress check-deleted /var/lib/matrix-synapse/media
+ /root/matrix-env/bin/s3_media_upload --no-progress upload /var/lib/matrix-synapse/media matrix --delete --endpoint-url https://garage.deuxfleurs.fr
+ sleep 600
+done