forked from Deuxfleurs/infrastructure
[frontend,matrix] finally fix order bug with traefik by assigning priorities
This commit is contained in:
parent
3c444363de
commit
1fee0441e8
6 changed files with 37 additions and 16 deletions
2
consul/configuration/.gitignore
vendored
2
consul/configuration/.gitignore
vendored
|
@ -27,3 +27,5 @@
|
||||||
!chat/**/*
|
!chat/**/*
|
||||||
|
|
||||||
!directory/*/*
|
!directory/*/*
|
||||||
|
|
||||||
|
!traefik/traefik.toml
|
||||||
|
|
|
@ -61,6 +61,15 @@ listeners:
|
||||||
resources:
|
resources:
|
||||||
- names: [client]
|
- names: [client]
|
||||||
compress: true
|
compress: true
|
||||||
|
|
||||||
|
- port: 8448
|
||||||
|
tls: false
|
||||||
|
bind_address: ''
|
||||||
|
type: http
|
||||||
|
|
||||||
|
x_forwarded: false
|
||||||
|
|
||||||
|
resources:
|
||||||
- names: [federation]
|
- names: [federation]
|
||||||
compress: false
|
compress: false
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
CF_API_EMAIL = "<email>"
|
|
||||||
CF_API_KEY = "<token>"
|
|
|
@ -4,8 +4,6 @@ defaultEntryPoints = ["http", "https"]
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.admin]
|
[entryPoints.admin]
|
||||||
address = ":8082"
|
address = ":8082"
|
||||||
[entryPoints.admin.auth.basic]
|
|
||||||
users = ["<username>:<hash>"]
|
|
||||||
|
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":80"
|
address = ":80"
|
||||||
|
@ -17,6 +15,11 @@ defaultEntryPoints = ["http", "https"]
|
||||||
compress = true
|
compress = true
|
||||||
[entryPoints.https.tls]
|
[entryPoints.https.tls]
|
||||||
|
|
||||||
|
[entryPoints.matrix]
|
||||||
|
address = ":8448"
|
||||||
|
compress = true
|
||||||
|
[entryPoints.matrix.tls]
|
||||||
|
|
||||||
[retry]
|
[retry]
|
||||||
|
|
||||||
[acme]
|
[acme]
|
||||||
|
@ -25,16 +28,9 @@ defaultEntryPoints = ["http", "https"]
|
||||||
entryPoint = "https"
|
entryPoint = "https"
|
||||||
onHostRule = true
|
onHostRule = true
|
||||||
|
|
||||||
# [acme.dnsChallenge]
|
|
||||||
# provider = "cloudflare"
|
|
||||||
# delayBeforeCheck = 0
|
|
||||||
|
|
||||||
[acme.httpChallenge]
|
[acme.httpChallenge]
|
||||||
entryPoint = "http"
|
entryPoint = "http"
|
||||||
|
|
||||||
#[[acme.domains]]
|
|
||||||
# main = "deuxfleurs.fr"
|
|
||||||
|
|
||||||
[api]
|
[api]
|
||||||
entryPoint = "admin"
|
entryPoint = "admin"
|
||||||
dashboard = true
|
dashboard = true
|
||||||
|
@ -49,5 +45,3 @@ defaultEntryPoints = ["http", "https"]
|
||||||
prefix = "traefik"
|
prefix = "traefik"
|
||||||
domain = "web.deuxfleurs.fr"
|
domain = "web.deuxfleurs.fr"
|
||||||
exposedByDefault = false
|
exposedByDefault = false
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ job "chat" {
|
||||||
readonly_rootfs = true
|
readonly_rootfs = true
|
||||||
port_map {
|
port_map {
|
||||||
client_port = 8008
|
client_port = 8008
|
||||||
|
federation_port = 8448
|
||||||
}
|
}
|
||||||
command = "python"
|
command = "python"
|
||||||
args = [
|
args = [
|
||||||
|
@ -96,18 +97,20 @@ job "chat" {
|
||||||
memory = 4000
|
memory = 4000
|
||||||
network {
|
network {
|
||||||
port "client_port" { }
|
port "client_port" { }
|
||||||
|
port "federation_port" { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
service {
|
service {
|
||||||
name = "synapse"
|
name = "synapse-client"
|
||||||
port = "client_port"
|
port = "client_port"
|
||||||
address_mode = "host"
|
address_mode = "host"
|
||||||
tags = [
|
tags = [
|
||||||
"matrix",
|
"matrix",
|
||||||
"traefik.enable=true",
|
"traefik.enable=true",
|
||||||
"traefik.frontend.entryPoints=https",
|
"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 {
|
check {
|
||||||
type = "tcp"
|
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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,8 @@ EOH
|
||||||
"webstatic",
|
"webstatic",
|
||||||
"traefik.enable=true",
|
"traefik.enable=true",
|
||||||
"traefik.frontend.entryPoints=https,http",
|
"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"
|
port = "web_port"
|
||||||
address_mode = "host"
|
address_mode = "host"
|
||||||
|
|
Loading…
Reference in a new issue