lure-web/template.nomad
Elara Musayelyan bd9a6c09ea
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Build without docker in docker
2023-08-16 12:00:43 -07:00

78 lines
1.6 KiB
HCL

job "lure-web" {
region = "global"
datacenters = ["dc1"]
type = "service"
group "lure-web" {
network {
port "api" {
to = 8080
}
port "http" {
to = 3000
}
}
task "lure-api-server" {
driver = "docker"
env {
LURE_API_GITHUB_SECRET = "${LURE_API_GITHUB_SECRET}"
// Hack to force Nomad to re-deploy the service
// instead of ignoring it
COMMIT_SHA = "${DRONE_COMMIT_SHA}"
}
config {
image = "elara6331/lure-api-server:latest"
ports = ["api"]
}
service {
name = "lure-api-server"
port = "api"
tags = [
"traefik.enable=true",
"traefik.http.routers.lure-api-server.rule=Host(`api.lure.elara.ws`)",
"traefik.http.routers.lure-api-server.tls.certresolver=letsencrypt"
]
check {
type = "tcp"
port = "api"
interval = "30s"
timeout = "2s"
}
}
}
task "lure-web" {
driver = "docker"
config {
image = "gitea.elara.ws/elara6331/lure-web:latest"
ports = ["http"]
}
service {
name = "lure-web"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.lure-web.rule=Host(`lure.elara.ws`)",
"traefik.http.routers.lure-web.tls.certresolver=letsencrypt",
]
}
}
}
constraint {
attribute = "${attr.cpu.arch}"
operator = "set_contains_any"
value = "amd64,arm64"
}
}