46 lines
877 B
HCL
46 lines
877 B
HCL
job "code-snippets" {
|
|
datacenters = ["dc1"]
|
|
type = "service"
|
|
|
|
variable "version" {
|
|
type = string
|
|
default = "latest"
|
|
}
|
|
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |