From e375304c388948efcb8cfcb45d8a8288a635a766 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 4 May 2023 16:48:22 +0200 Subject: orient SoGo and Synapse to closest psql-proxy; psql backup anywhere --- cluster/prod/app/matrix/config/synapse/homeserver.yaml | 2 +- cluster/prod/app/matrix/deploy/im.hcl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cluster/prod/app/matrix') diff --git a/cluster/prod/app/matrix/config/synapse/homeserver.yaml b/cluster/prod/app/matrix/config/synapse/homeserver.yaml index aac8709..ecdf1cd 100644 --- a/cluster/prod/app/matrix/config/synapse/homeserver.yaml +++ b/cluster/prod/app/matrix/config/synapse/homeserver.yaml @@ -61,7 +61,7 @@ database: user: {{ key "secrets/chat/synapse/postgres_user" | trimSpace }} password: {{ key "secrets/chat/synapse/postgres_pwd" | trimSpace }} database: {{ key "secrets/chat/synapse/postgres_db" | trimSpace }} - host: psql-proxy.service.prod.consul + host: {{ env "meta.site" }}.psql-proxy.service.prod.consul port: 5432 cp_min: 5 cp_max: 10 diff --git a/cluster/prod/app/matrix/deploy/im.hcl b/cluster/prod/app/matrix/deploy/im.hcl index ed05ffc..6b9690d 100644 --- a/cluster/prod/app/matrix/deploy/im.hcl +++ b/cluster/prod/app/matrix/deploy/im.hcl @@ -123,7 +123,7 @@ 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_HOST={{ env "meta.site" }}.psql-proxy.service.2.cluster.deuxfleurs.fr PG_PORT=5432 EOH destination = "secrets/env" -- cgit v1.2.3 From b73c39c7c17d06468f5efc6c7a9c99bf09ec4f1f Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 4 May 2023 17:00:31 +0200 Subject: multi-zone matrix --- cluster/prod/app/matrix/deploy/im.hcl | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'cluster/prod/app/matrix') diff --git a/cluster/prod/app/matrix/deploy/im.hcl b/cluster/prod/app/matrix/deploy/im.hcl index 6b9690d..324c3d9 100644 --- a/cluster/prod/app/matrix/deploy/im.hcl +++ b/cluster/prod/app/matrix/deploy/im.hcl @@ -1,5 +1,5 @@ job "matrix" { - datacenters = ["orion"] + datacenters = ["orion", "neptune"] type = "service" priority = 40 @@ -8,6 +8,7 @@ job "matrix" { network { port "api_port" { static = 8008 } + port "web_port" { to = 8043 } } task "synapse" { @@ -79,6 +80,7 @@ job "matrix" { "tricot im.deuxfleurs.fr:443/_matrix 100", "tricot im.deuxfleurs.fr/_synapse 100", "tricot-add-header Access-Control-Allow-Origin *", + "d53-cname im.deuxfleurs.fr", ] check { type = "tcp" @@ -130,17 +132,8 @@ EOH env = true } } - } - - - group "riotweb" { - count = 1 - - network { - port "web_port" { to = 8043 } - } - task "server" { + task "riotweb" { driver = "docker" config { image = "superboum/amd64_riotweb:v33" @@ -164,6 +157,7 @@ EOH "webstatic", "tricot im.deuxfleurs.fr 10", "tricot riot.deuxfleurs.fr 10", + "d53-cname riot.deuxfleurs.fr", ] port = "web_port" address_mode = "host" -- cgit v1.2.3