diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-09-17 18:49:45 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-09-17 18:49:45 +0200 |
commit | 136d1761766e94c502f4d18dba8b16422e62d159 (patch) | |
tree | 3741c1f2adf776e10d5ba047781f7b02914b7161 /app/im/deploy/im.hcl | |
parent | 2a0610658d9875b24faf74c8ad7a12d17ab5d745 (diff) | |
download | infrastructure-136d1761766e94c502f4d18dba8b16422e62d159.tar.gz infrastructure-136d1761766e94c502f4d18dba8b16422e62d159.zip |
Synapse does not use GlusterFS anymore
Diffstat (limited to 'app/im/deploy/im.hcl')
-rw-r--r-- | app/im/deploy/im.hcl | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/app/im/deploy/im.hcl b/app/im/deploy/im.hcl index 98ea9b7..645d966 100644 --- a/app/im/deploy/im.hcl +++ b/app/im/deploy/im.hcl @@ -15,7 +15,7 @@ job "im" { driver = "docker" config { - image = "superboum/amd64_synapse:v46" + image = "superboum/amd64_synapse:v47" network_mode = "host" readonly_rootfs = true ports = [ "client_port", "federation_port" ] @@ -27,13 +27,13 @@ job "im" { ] volumes = [ "secrets/conf:/etc/matrix-synapse", - "/mnt/glusterfs/chat/matrix/synapse/media:/var/lib/matrix-synapse/media", - "/mnt/glusterfs/chat/matrix/synapse/uploads:/var/lib/matrix-synapse/uploads", + "/tmp/synapse-media:/var/lib/matrix-synapse/media", + "/tmp/synapse-uploads:/var/lib/matrix-synapse/uploads", "/tmp/synapse-logs:/var/log/matrix-synapse", "/tmp/synapse:/tmp" ] } - + template { data = file("../config/synapse/homeserver.yaml") destination = "secrets/conf/homeserver.yaml" @@ -130,6 +130,43 @@ job "im" { } + task "media-async-upload" { + driver = "docker" + + config { + image = "superboum/amd64_synapse:v47" + readonly_rootfs = true + command = "/usr/local/bin/matrix-s3-async" + work_dir = "/tmp" + volumes = [ + "/tmp/synapse-media:/var/lib/matrix-synapse/media", + "/tmp/synapse-uploads:/var/lib/matrix-synapse/uploads", + "/tmp/synapse:/tmp" + ] + } + + resources { + cpu = 100 + memory = 200 + } + + template { + data = <<EOH +AWS_ACCESS_KEY_ID={{ key "secrets/chat/synapse/s3_access_key" | trimSpace }} +AWS_SECRET_ACCESS_KEY={{ key "secrets/chat/synapse/s3_secret_key" | trimSpace }} +AWS_DEFAULT_REGION=garage +PG_USER={{ key "secrets/chat/synapse/postgres_user" | trimSpace }} +PG_PASS={{ key "secrets/chat/synapse/postgres_pwd" | trimSpace }} +PG_DB={{ key "secrets/chat/synapse/postgres_db" | trimSpace }} +PG_HOST=psql-proxy.service.2.cluster.deuxfleurs.fr +PG_PORT=5432 +EOH + destination = "secrets/env" + env = true + } + } + + group "riotweb" { count = 1 |