aboutsummaryrefslogtreecommitdiff
path: root/cluster/prod/app/postgres
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-05-09 12:20:35 +0200
committerAlex Auvolat <alex@adnab.me>2023-05-09 12:20:35 +0200
commit24cf7ddd91e4b726d2ed276787947e104e26b53b (patch)
treeaeeec287fa80593ec83f0022d246a7defbf72c92 /cluster/prod/app/postgres
parent6c07a429781d4a26a546e3f3049b41e0b968b033 (diff)
parent24192cc61a982402e201d6dde4fa5ac2994e025f (diff)
downloadnixcfg-24cf7ddd91e4b726d2ed276787947e104e26b53b.tar.gz
nixcfg-24cf7ddd91e4b726d2ed276787947e104e26b53b.zip
Merge branch 'main' into simplify-network-config
Diffstat (limited to 'cluster/prod/app/postgres')
-rw-r--r--cluster/prod/app/postgres/deploy/postgres.hcl20
1 files changed, 17 insertions, 3 deletions
diff --git a/cluster/prod/app/postgres/deploy/postgres.hcl b/cluster/prod/app/postgres/deploy/postgres.hcl
index 9bad079..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,20 @@ 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
+ delay = "15s"
+ mode = "delay"
+ }
+
task "sentinel" {
driver = "docker"
@@ -99,7 +113,7 @@ job "postgres14" {
}
service {
- tags = ["sql"]
+ tags = ["sql", "${meta.site}"]
port = "psql_proxy_port"
address_mode = "host"
name = "psql-proxy"
@@ -179,7 +193,7 @@ job "postgres14" {
}
service {
- tags = ["sql"]
+ tags = ["sql", "${meta.site}"]
port = "psql_port"
address_mode = "host"
name = "psql-keeper"