diff options
author | Alex Auvolat <alex@adnab.me> | 2022-01-10 21:36:27 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-01-10 21:36:27 +0100 |
commit | 71062a2d40961c396aba93e5e61f3bd59c8872b9 (patch) | |
tree | 9a420185f3ee917810239b078e7051614a0166a3 /app/im/deploy/im.hcl | |
parent | 49270804434a954c5ee3d491a9d20b34bdb555ec (diff) | |
download | nixcfg-71062a2d40961c396aba93e5e61f3bd59c8872b9.tar.gz nixcfg-71062a2d40961c396aba93e5e61f3bd59c8872b9.zip |
Matrix media natively on S3
Diffstat (limited to 'app/im/deploy/im.hcl')
-rw-r--r-- | app/im/deploy/im.hcl | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/app/im/deploy/im.hcl b/app/im/deploy/im.hcl index fd97c7b..1902978 100644 --- a/app/im/deploy/im.hcl +++ b/app/im/deploy/im.hcl @@ -52,10 +52,10 @@ job "im" { task "synapse" { driver = "docker" config { - image = "matrixdotorg/synapse:v1.48.0" + image = "lxpz/amd64_synapse:test7" ports = [ "http" ] - entrypoint = [ "/usr/local/bin/python" ] + command = "python" args = [ "-m", "synapse.app.homeserver", "-n", @@ -65,7 +65,6 @@ job "im" { volumes = [ "secrets:/etc/matrix-synapse", "../alloc/data:/ephemeral", - "/mnt/garage-staging/synapse-data:/data", ] } @@ -105,6 +104,35 @@ job "im" { } } + task "media-async-upload" { + driver = "docker" + + config { + image = "lxpz/amd64_synapse:test7" + readonly_rootfs = true + command = "/usr/local/bin/matrix-s3-async-sqlite" + work_dir = "/ephemeral" + volumes = [ + "../alloc/data:/ephemeral", + ] + } + + resources { + cpu = 100 + memory = 200 + } + + template { + data = <<EOH +AWS_ACCESS_KEY_ID={{ key "secrets/synapse/s3_access_key" | trimSpace }} +AWS_SECRET_ACCESS_KEY={{ key "secrets/synapse/s3_secret_key" | trimSpace }} +AWS_DEFAULT_REGION=garage-staging +EOH + destination = "secrets/env" + env = true + } + } + task "replicate-db" { driver = "docker" config { |