nova-timetable: fix traefik/ports, formatting

This commit is contained in:
wizzdom 2024-08-09 12:13:03 +01:00
parent a74b64c5e2
commit 005001d1e6

View file

@ -1,16 +1,11 @@
job "nova-timetable" {
datacenters = ["aperture"]
type = "service"
type = "service"
group "nova-timetable" {
count = 1
network {
port "http" {
to = 80
}
port "db" {
to = 6379
}
@ -34,21 +29,21 @@ job "nova-timetable" {
service {
name = "nova-timetable-frontend"
port = "http"
port = "frontend"
check {
type = "http"
path = "/"
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
timeout = "2s"
}
tags = [
"traefik.enable=true",
"traefik.port=${NOMAD_PORT_frontend}",
"traefik.http.routers.nova-timetable-frontend.rule=Host(`timetable.redbrick.dcu.ie`)",
"traefik.http.routers.nova-timetable-frontend.entrypoints=web,websecure",
"traefik.http.routers.nova-timetable-frontend.tls.certresolver=lets-encrypt",
"traefik.http.services.nova-timetable-frontend.loadbalancer.server.port=3000"
]
}
}
@ -67,21 +62,21 @@ job "nova-timetable" {
service {
name = "nova-timetable-backend"
port = "http"
port = "backend"
check {
type = "http"
path = "/api/healthcheck"
type = "http"
path = "/api/healthcheck"
interval = "10s"
timeout = "2s"
timeout = "2s"
}
tags = [
"traefik.enable=true",
"traefik.port=${NOMAD_PORT_backend}",
"traefik.http.routers.nova-timetable-backend.rule=Host(`timetable.redbrick.dcu.ie`) && PathPrefix(`/api`)",
"traefik.http.routers.nova-timetable-backend.entrypoints=web,websecure",
"traefik.http.routers.nova-timetable-backend.tls.certresolver=lets-encrypt",
"traefik.http.services.nova-timetable-backend.loadbalancer.server.port=4000"
]
}
}
@ -95,4 +90,4 @@ job "nova-timetable" {
}
}
}
}
}