aboutsummaryrefslogtreecommitdiff
path: root/nomad
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2020-03-09 14:11:24 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2020-03-09 14:11:24 +0100
commit1fee0441e817483bd20bda370d3a87d3eb37feef (patch)
treed82a7323405f0afe0ef12fb8fcf4fd2df153560d /nomad
parent3c444363de260d479f50d894b853f49b58daed6c (diff)
downloadinfrastructure-1fee0441e817483bd20bda370d3a87d3eb37feef.tar.gz
infrastructure-1fee0441e817483bd20bda370d3a87d3eb37feef.zip
[frontend,matrix] finally fix order bug with traefik by assigning priorities
Diffstat (limited to 'nomad')
-rw-r--r--nomad/chat.hcl21
-rw-r--r--nomad/web_static.hcl3
2 files changed, 21 insertions, 3 deletions
diff --git a/nomad/chat.hcl b/nomad/chat.hcl
index 812f009..042e619 100644
--- a/nomad/chat.hcl
+++ b/nomad/chat.hcl
@@ -12,6 +12,7 @@ job "chat" {
readonly_rootfs = true
port_map {
client_port = 8008
+ federation_port = 8448
}
command = "python"
args = [
@@ -96,18 +97,20 @@ job "chat" {
memory = 4000
network {
port "client_port" { }
+ port "federation_port" { }
}
}
service {
- name = "synapse"
+ name = "synapse-client"
port = "client_port"
address_mode = "host"
tags = [
"matrix",
"traefik.enable=true",
"traefik.frontend.entryPoints=https",
- "traefik.frontend.rule=Host:im.deuxfleurs.fr,deuxfleurs.fr;PathPrefix:/_matrix"
+ "traefik.frontend.rule=Host:im.deuxfleurs.fr;PathPrefix:/_matrix",
+ "traefik.frontend.priority=100"
]
check {
type = "tcp"
@@ -121,6 +124,20 @@ job "chat" {
}
}
}
+
+ service {
+ name = "synapse-federation"
+ port = "federation_port"
+ address_mode = "host"
+ tags = [
+ "matrix",
+ "traefik.enable=true",
+ "traefik.frontend.entryPoints=https",
+ "traefik.frontend.rule=Host:deuxfleurs.fr;PathPrefix:/_matrix",
+ "traefik.frontend.priority=100"
+ ]
+ }
+
}
}
diff --git a/nomad/web_static.hcl b/nomad/web_static.hcl
index 5a3b80f..b3ad3e8 100644
--- a/nomad/web_static.hcl
+++ b/nomad/web_static.hcl
@@ -38,7 +38,8 @@ EOH
"webstatic",
"traefik.enable=true",
"traefik.frontend.entryPoints=https,http",
- "traefik.frontend.rule=Host:deuxfleurs.fr,www.deuxfleurs.fr,deuxfleurs.org,www.deuxfleurs.org;PathPrefix:/"
+ "traefik.frontend.rule=Host:deuxfleurs.fr,www.deuxfleurs.fr,deuxfleurs.org,www.deuxfleurs.org;PathPrefix:/",
+ "traefik.frontend.priority=10"
]
port = "web_port"
address_mode = "host"