Compare commits

..

No commits in common. "34ee9682d01d53670fb01c96d9128386808bf284" and "c6b078cb2dcae7438d6f37c7d029ad10d29fb553" have entirely different histories.

6 changed files with 257 additions and 81 deletions

View file

@ -1,15 +1,8 @@
job "hello-world" { job "hello-world" {
group "servers" { datacenters = ["dc1"]
network { group "servers" {
mode = "bridge" count = 1
port "www" {
to = 8001
}
port "envoy_metrics" {
to = 9102
}
}
task "web" { task "web" {
driver = "docker" driver = "docker"
@ -32,30 +25,20 @@ job "hello-world" {
} }
} }
service { network {
port = 8001 mode = "bridge"
provider = "consul" port "www" {
to = 8001
connect {
sidecar_service {
proxy {
expose {
path {
path = "/metrics"
protocol = "http"
local_path_port = 9102
listener_port = "envoy_metrics"
}
}
transparent_proxy {}
}
}
} }
}
service {
port = "www"
provider = "consul"
tags = [ tags = [
"traefik.enable=true", "traefik.enable=true",
"traefik.http.routers.web.rule=Host(`hello-world.brmartin.co.uk`)", "traefik.http.routers.web.rule=Host(`hello-world.brmartin.co.uk`)",
"traefik.consulcatalog.connect=true",
] ]
} }
} }

View file

@ -50,14 +50,41 @@ job "jayne-martin-counselling" {
} }
} }
} }
}
}
group "webserver-ingress-group" {
network {
mode = "bridge"
port "inbound" {
to = 8080
}
}
service {
port = "inbound"
tags = [ tags = [
"traefik.enable=true", "traefik.enable=true",
"traefik.http.routers.jmc.rule=Host(`www.jaynemartincounselling.co.uk`)", "traefik.http.routers.jmc.rule=Host(`www.jaynemartincounselling.co.uk`)",
"traefik.http.routers.jmc.entrypoints=websecure", "traefik.http.routers.jmc.entrypoints=websecure"
"traefik.consulcatalog.connect=true",
] ]
connect {
gateway {
ingress {
listener {
port = 8080
protocol = "http"
service {
name = "jayne-martin-counselling-webserver"
hosts = ["*"]
}
}
}
}
}
} }
} }
} }

View file

@ -38,14 +38,6 @@ job "keycloak" {
} }
} }
} }
tags = [
"traefik.enable=true",
"traefik.http.routers.keycloak.rule=Host(`sso.brmartin.co.uk`)",
"traefik.http.routers.keycloak.entrypoints=websecure",
"traefik.consulcatalog.connect=true",
]
} }
task "keycloak" { task "keycloak" {
@ -93,4 +85,39 @@ job "keycloak" {
"service.name" = "keycloak" "service.name" = "keycloak"
} }
} }
group "keycloak-ingress-group" {
network {
mode = "bridge"
port "inbound" {
to = 8080
}
}
service {
port = "inbound"
tags = [
"traefik.enable=true",
"traefik.http.routers.keycloak.rule=Host(`sso.brmartin.co.uk`)",
"traefik.http.routers.keycloak.entrypoints=websecure",
]
connect {
gateway {
ingress {
listener {
port = 8080
protocol = "http"
service {
name = "keycloak-keycloak"
hosts = ["*"]
}
}
}
}
}
}
}
} }

View file

@ -51,19 +51,6 @@ job "matrix" {
} }
} }
} }
tags = [
"traefik.enable=true",
"traefik.http.routers.synapse.rule=Host(`matrix.brmartin.co.uk`)",
"traefik.http.routers.synapse.entrypoints=websecure",
"traefik.http.routers.synapse.middlewares=synapseHeaders,synapseBuffering",
"traefik.http.middlewares.synapseHeaders.headers.accesscontrolallowmethods=GET,POST,PUT,DELETE,OPTIONS",
"traefik.http.middlewares.synapseHeaders.headers.accesscontrolallowheaders=Origin,X-Requested-With,Content-Type,Accept,Authorization",
"traefik.http.middlewares.synapseHeaders.headers.accesscontrolalloworiginlist=*",
"traefik.http.middlewares.synapseBuffering.buffering.maxRequestBodyBytes=1000000000",
"traefik.consulcatalog.connect=true",
]
} }
task "synapse" { task "synapse" {
@ -333,14 +320,6 @@ job "matrix" {
} }
} }
} }
tags = [
"traefik.enable=true",
"traefik.http.routers.mas.rule=Host(`mas.brmartin.co.uk`) || (Host(`matrix.brmartin.co.uk`) && PathRegexp(`^/_matrix/client/(.*)/(login|logout|refresh)`))",
"traefik.http.routers.mas.entrypoints=websecure",
"traefik.consulcatalog.connect=true",
]
} }
task "mas" { task "mas" {
@ -408,17 +387,6 @@ job "matrix" {
} }
} }
} }
tags = [
"traefik.enable=true",
"traefik.http.routers.matrixWellKnown.rule=PathPrefix(`/.well-known/matrix`)",
"traefik.http.routers.matrixWellKnown.entrypoints=websecure",
"traefik.http.routers.matrixWellKnown.middlewares=matrixWellKnown",
"traefik.http.middlewares.matrixWellKnown.headers.accesscontrolalloworiginlist=*",
"traefik.consulcatalog.connect=true",
]
} }
task "nginx" { task "nginx" {
@ -495,6 +463,123 @@ job "matrix" {
} }
} }
group "synapse-ingress-group" {
network {
mode = "bridge"
port "inbound" {
to = 8080
}
}
service {
port = "inbound"
tags = [
"traefik.enable=true",
"traefik.http.routers.synapse.rule=Host(`matrix.brmartin.co.uk`)",
"traefik.http.routers.synapse.entrypoints=websecure",
"traefik.http.routers.synapse.middlewares=synapseHeaders,synapseBuffering",
"traefik.http.middlewares.synapseHeaders.headers.accesscontrolallowmethods=GET,POST,PUT,DELETE,OPTIONS",
"traefik.http.middlewares.synapseHeaders.headers.accesscontrolallowheaders=Origin,X-Requested-With,Content-Type,Accept,Authorization",
"traefik.http.middlewares.synapseHeaders.headers.accesscontrolalloworiginlist=*",
"traefik.http.middlewares.synapseBuffering.buffering.maxRequestBodyBytes=1000000000",
]
connect {
gateway {
proxy {
config {
local_idle_timeout_ms = 120000
}
}
ingress {
listener {
port = 8080
protocol = "http"
service {
name = "matrix-synapse"
hosts = ["*"]
}
}
}
}
}
}
}
group "mas-ingress-group" {
network {
mode = "bridge"
port "inbound" {
to = 8080
}
}
service {
port = "inbound"
tags = [
"traefik.enable=true",
"traefik.http.routers.mas.rule=Host(`mas.brmartin.co.uk`) || (Host(`matrix.brmartin.co.uk`) && PathRegexp(`^/_matrix/client/(.*)/(login|logout|refresh)`))",
"traefik.http.routers.mas.entrypoints=websecure",
]
connect {
gateway {
ingress {
listener {
port = 8080
protocol = "http"
service {
name = "matrix-mas"
hosts = ["*"]
}
}
}
}
}
}
}
group "wellknown-ingress-group" {
network {
mode = "bridge"
port "inbound" {
to = 8080
}
}
service {
port = "inbound"
tags = [
"traefik.enable=true",
"traefik.http.routers.matrixWellKnown.rule=PathPrefix(`/.well-known/matrix`)",
"traefik.http.routers.matrixWellKnown.entrypoints=websecure",
"traefik.http.routers.matrixWellKnown.middlewares=matrixWellKnown",
"traefik.http.middlewares.matrixWellKnown.headers.accesscontrolalloworiginlist=*",
]
connect {
gateway {
ingress {
listener {
port = 8080
protocol = "http"
service {
name = "matrix-nginx"
hosts = ["*"]
}
}
}
}
}
}
}
group "element" { group "element" {
network { network {

View file

@ -97,14 +97,6 @@ job "media-centre" {
} }
} }
} }
tags = [
"traefik.enable=true",
"traefik.http.routers.plex.entrypoints=websecure",
"traefik.http.routers.plex.rule=Host(`plex.brmartin.co.uk`)",
"traefik.consulcatalog.connect=true",
]
} }
network { network {
@ -160,4 +152,39 @@ job "media-centre" {
} }
} }
} }
group "plex-ingress-group" {
network {
mode = "bridge"
port "inbound" {
to = 8080
}
}
service {
port = "inbound"
tags = [
"traefik.enable=true",
"traefik.http.routers.plex.entrypoints=websecure",
"traefik.http.routers.plex.rule=Host(`plex.brmartin.co.uk`)"
]
connect {
gateway {
ingress {
listener {
port = 8080
protocol = "http"
service {
name = "media-centre-plex"
hosts = ["*"]
}
}
}
}
}
}
}
} }

View file

@ -133,14 +133,41 @@ job "ollama" {
} }
} }
} }
}
}
group "open-webui-ingress-group" {
network {
mode = "bridge"
port "inbound" {
to = 8080
}
}
service {
port = "inbound"
tags = [ tags = [
"traefik.enable=true", "traefik.enable=true",
"traefik.http.routers.openwebui.rule=Host(`eos.brmartin.co.uk`)", "traefik.http.routers.openwebui.rule=Host(`eos.brmartin.co.uk`)",
"traefik.http.routers.openwebui.entrypoints=websecure", "traefik.http.routers.openwebui.entrypoints=websecure"
"traefik.consulcatalog.connect=true",
] ]
connect {
gateway {
ingress {
listener {
port = 8080
protocol = "http"
service {
name = "ollama-open-webui"
hosts = ["*"]
}
}
}
}
}
} }
} }
} }