aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cluster/prod/app/plume/config/app.env2
-rw-r--r--cluster/prod/app/postgres/deploy/postgres.hcl13
2 files changed, 11 insertions, 4 deletions
diff --git a/cluster/prod/app/plume/config/app.env b/cluster/prod/app/plume/config/app.env
index 5c9ede6..b751bd6 100644
--- a/cluster/prod/app/plume/config/app.env
+++ b/cluster/prod/app/plume/config/app.env
@@ -12,7 +12,7 @@ ROCKET_SECRET_KEY={{ key "secrets/plume/secret_key" | trimSpace }}
POSTGRES_PASSWORD={{ key "secrets/plume/pgsql_pw" | trimSpace }}
POSTGRES_USER=plume
POSTGRES_DB=plume
-DATABASE_URL=postgres://plume:{{ key "secrets/plume/pgsql_pw" | trimSpace }}@psql-proxy.service.prod.consul:5432/plume
+DATABASE_URL=postgres://plume:{{ key "secrets/plume/pgsql_pw" | trimSpace }}@{{ env "meta.site" }}.psql-proxy.service.prod.consul:5432/plume
MIGRATION_DIRECTORY=migrations/postgres
USE_HTTPS=0
diff --git a/cluster/prod/app/postgres/deploy/postgres.hcl b/cluster/prod/app/postgres/deploy/postgres.hcl
index 2aa2d07..e8825a1 100644
--- a/cluster/prod/app/postgres/deploy/postgres.hcl
+++ b/cluster/prod/app/postgres/deploy/postgres.hcl
@@ -1,5 +1,5 @@
job "postgres14" {
- datacenters = ["orion"]
+ datacenters = ["orion", "neptune", "bespin"]
type = "system"
priority = 90
@@ -16,6 +16,13 @@ job "postgres14" {
port "psql_port" { static = 5433 }
}
+ constraint {
+ attribute = "${attr.unique.hostname}"
+ operator = "set_contains_any"
+ # target: courgette,df-ymf,abricot (or ananas)
+ value = "diplotaxis,courgette,concombre,df-ymf"
+ }
+
restart {
interval = "10m"
attempts = 10
@@ -106,7 +113,7 @@ job "postgres14" {
}
service {
- tags = ["sql"]
+ tags = ["sql", "${meta.site}"]
port = "psql_proxy_port"
address_mode = "host"
name = "psql-proxy"
@@ -186,7 +193,7 @@ job "postgres14" {
}
service {
- tags = ["sql"]
+ tags = ["sql", "${meta.site}"]
port = "psql_port"
address_mode = "host"
name = "psql-keeper"