diff options
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 |