atlas: new name, new domain, new redirects
This commit is contained in:
parent
3170f824e5
commit
5de8e05793
3 changed files with 51 additions and 47 deletions
|
@ -1,46 +0,0 @@
|
|||
job "11ty-website" {
|
||||
datacenters = ["aperture"]
|
||||
type = "service"
|
||||
|
||||
group "nginx-11ty-website" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
port "http" {
|
||||
to = 80
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
port = "http"
|
||||
|
||||
check {
|
||||
type = "http"
|
||||
path = "/"
|
||||
interval = "10s"
|
||||
timeout = "2s"
|
||||
}
|
||||
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.nginx-11ty-website.rule=Host(`canary.redbrick.dcu.ie`)",
|
||||
"traefik.http.routers.nginx-11ty-website.entrypoints=web,websecure",
|
||||
"traefik.http.routers.nginx-11ty-website.tls.certresolver=lets-encrypt",
|
||||
]
|
||||
}
|
||||
|
||||
task "webserver" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "ghcr.io/redbrick/11ty-website:latest"
|
||||
ports = ["http"]
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 100
|
||||
memory = 500
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
50
jobs/nginx/atlas.hcl
Normal file
50
jobs/nginx/atlas.hcl
Normal file
|
@ -0,0 +1,50 @@
|
|||
job "atlas" {
|
||||
datacenters = ["aperture"]
|
||||
type = "service"
|
||||
|
||||
group "nginx-atlas" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
port "http" {
|
||||
to = 80
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
port = "http"
|
||||
|
||||
check {
|
||||
type = "http"
|
||||
path = "/"
|
||||
interval = "10s"
|
||||
timeout = "2s"
|
||||
}
|
||||
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.nginx-atlas.rule=Host(`redbrick.dcu.ie`) || Host(`rb.dcu.ie`)",
|
||||
"traefik.http.routers.nginx-atlas.entrypoints=web,websecure",
|
||||
"traefik.http.routers.nginx-atlas.tls.certresolver=lets-encrypt",
|
||||
"traefik.http.routers.nginx-atlas.middlewares=redirect-user-web",
|
||||
"traefik.http.middlewares.redirect-user-web.redirectregex.permanent=true",
|
||||
"traefik.http.middlewares.redirect-user-web.redirectregex.regex=https://redbrick\\.dcu\\.ie/~([^/]*)(/)?(.*)?",
|
||||
"traefik.http.middlewares.redirect-user-web.redirectregex.replacement=https://$1.redbrick.dcu.ie/$2",
|
||||
]
|
||||
}
|
||||
|
||||
task "web" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "ghcr.io/redbrick/atlas:latest"
|
||||
ports = ["http"]
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 100
|
||||
memory = 500
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ job "traefik" {
|
|||
config {
|
||||
image = "traefik"
|
||||
network_mode = "host"
|
||||
|
||||
|
||||
volumes = [
|
||||
"local/traefik.toml:/etc/traefik/traefik.toml",
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue