aboutsummaryrefslogtreecommitdiff
path: root/app/im/build/matrix-synapse/matrix-s3-async
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-01-10 21:36:27 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-10 21:36:27 +0100
commit71062a2d40961c396aba93e5e61f3bd59c8872b9 (patch)
tree9a420185f3ee917810239b078e7051614a0166a3 /app/im/build/matrix-synapse/matrix-s3-async
parent49270804434a954c5ee3d491a9d20b34bdb555ec (diff)
downloadnixcfg-71062a2d40961c396aba93e5e61f3bd59c8872b9.tar.gz
nixcfg-71062a2d40961c396aba93e5e61f3bd59c8872b9.zip
Matrix media natively on S3
Diffstat (limited to 'app/im/build/matrix-synapse/matrix-s3-async')
-rwxr-xr-xapp/im/build/matrix-synapse/matrix-s3-async16
1 files changed, 16 insertions, 0 deletions
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