aboutsummaryrefslogtreecommitdiff
path: root/app/im/build/matrix-synapse/matrix-s3-async-sqlite
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-sqlite
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-sqlite')
-rwxr-xr-xapp/im/build/matrix-synapse/matrix-s3-async-sqlite13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/im/build/matrix-synapse/matrix-s3-async-sqlite b/app/im/build/matrix-synapse/matrix-s3-async-sqlite
new file mode 100755
index 0000000..b9eb73a
--- /dev/null
+++ b/app/im/build/matrix-synapse/matrix-s3-async-sqlite
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+cat > database.yaml <<EOF
+sqlite:
+ database: /ephemeral/homeserver.db
+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 /ephemeral/media_store
+ /root/matrix-env/bin/s3_media_upload --no-progress upload /ephemeral/media_store matrix --delete --endpoint-url https://garage-staging.home.adnab.me
+ sleep 600
+done