added noamad deployment
This commit is contained in:
46
infra/nomad/code-snippets.nomad.hcl
Normal file
46
infra/nomad/code-snippets.nomad.hcl
Normal file
@@ -0,0 +1,46 @@
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user