Some checks failed
Build / build (pull_request) Failing after 27s
- manage nomad jobs - create makefile - create gitignore - manage terragrunt environments - add build jobs
63 lines
1.2 KiB
HCL
63 lines
1.2 KiB
HCL
job "testapp2" {
|
|
datacenters = ["au-syd1"]
|
|
type = "service"
|
|
|
|
group "http" {
|
|
count = 3
|
|
|
|
network {
|
|
port "http" {
|
|
to = 8080
|
|
}
|
|
}
|
|
|
|
update {
|
|
max_parallel = 2
|
|
health_check = "checks"
|
|
min_healthy_time = "30s"
|
|
healthy_deadline = "5m"
|
|
progress_deadline = "10m"
|
|
auto_revert = true
|
|
auto_promote = true
|
|
canary = 1
|
|
stagger = "15s"
|
|
}
|
|
|
|
task "http-server" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "git.query.consul/unkin/almalinux9:latest"
|
|
network_mode = "bridge"
|
|
ports = ["http"]
|
|
command = "sh"
|
|
args = ["-c", "cd /data/; python3 -m http.server 8080"]
|
|
|
|
volumes = ["/shared/nomad/testing:/data"]
|
|
}
|
|
|
|
resources {
|
|
cpu = 250 # Adjust as needed
|
|
memory = 128 # Adjust as needed
|
|
}
|
|
|
|
service {
|
|
name = "testapp2"
|
|
port = "http"
|
|
|
|
address_mode = "driver"
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/"
|
|
interval = "10s"
|
|
timeout = "2s"
|
|
}
|
|
}
|
|
env {
|
|
PYTHONUNBUFFERED = "1"
|
|
}
|
|
}
|
|
}
|
|
}
|