orchestration-tests/nomad/blocky/blocky.nomad

68 lines
1.1 KiB
Plaintext
Raw Normal View History

2022-02-28 20:07:34 +00:00
variable "config_data" {
type = string
description = "Plain text config file for blocky"
}
job "blocky" {
datacenters = ["dc1"]
type = "service"
group "blocky" {
count = 1
network {
mode = "bridge"
port "dns" {
static = "53"
}
port "web" {
to = "4000"
}
}
service {
2022-03-13 17:13:19 +00:00
name = "blocky-dns"
2022-02-28 20:07:34 +00:00
port = "dns"
}
service {
2022-03-13 17:13:19 +00:00
name = "blocky-api"
2022-02-28 20:07:34 +00:00
port = "web"
tags = [
"traefik.enable=true",
"traefik.consulcatalog.connect=false",
"traefik.http.routers.blocky.entrypoints=web,websecure",
"traefik.http.routers.blocky.tls=true",
]
}
task "main" {
driver = "docker"
config {
image = "ghcr.io/0xerr0r/blocky"
ports = ["dns", "web"]
mount {
type = "bind"
target = "/app/config.yml"
source = "app/config.yml"
}
}
resources {
cpu = 50
memory = 100
}
template {
data = var.config_data
destination = "app/config.yml"
}
}
}
}