Files
code-snippets/infra/nomad/code-snippets.nomad.hcl
Liam Pietralla acee9670d0
All checks were successful
Build, Test & Publish / Build (pull_request) Successful in 23s
Build, Test & Publish / Build and Publish Container Image (pull_request) Has been skipped
Build, Test & Publish / Deploy to Infrastructure (pull_request) Has been skipped
fix var
2025-10-19 21:39:32 +11:00

46 lines
865 B
HCL

variable "version" {
type = string
default = "latest"
}
job "code-snippets" {
datacenters = ["dc1"]
type = "service"
group "code-snippets" {
count = 1
network {
port "http" {
to = 80
}
}
task "code-snippets" {
driver = "docker"
config {
image = "liamsgit.dev/LiamPietralla/code-snippets:${var.version}"
force_pull = true
ports = ["http"]
}
service {
name = "code-snippets"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.code-snippets.rule=PathPrefix(`/`)",
"traefik.http.routers.code-snippets.entrypoints=p5003"
]
check {
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
}
}
}
}