fix: move service block to group level for nomad provider
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/nomad-validate Pipeline failed
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/nomad-validate Pipeline failed
ci/woodpecker/pr/secret-scan Pipeline was successful

The Nomad native service provider requires the service block at the
group level, not inside the task. Script checks use task = "agents"
to specify the execution context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude 2026-04-17 10:07:36 +00:00
parent aa7db2a5fc
commit c17548a216

View file

@ -68,6 +68,24 @@ job "agents" {
mode = "delay" mode = "delay"
} }
# Health check
# Script-based check matching docker-compose's pgrep healthcheck.
# Group-level service with `task` attribute on the check to run the
# script inside the agents container.
service {
name = "agents"
provider = "nomad"
check {
type = "script"
task = "agents"
command = "/usr/bin/pgrep"
args = ["-f", "entrypoint.sh"]
interval = "60s"
timeout = "5s"
}
}
task "agents" { task "agents" {
driver = "docker" driver = "docker"
@ -177,22 +195,6 @@ FORGE_VAULT_TOKEN=seed-me
EOT EOT
} }
# Health check
# Script-based check matching docker-compose's pgrep healthcheck.
# Nomad script checks run inside the container.
service {
name = "agents"
provider = "nomad"
check {
type = "script"
command = "/usr/bin/pgrep"
args = ["-f", "entrypoint.sh"]
interval = "60s"
timeout = "5s"
}
}
# Agents run Claude/llama sessions need CPU + memory headroom. # Agents run Claude/llama sessions need CPU + memory headroom.
resources { resources {
cpu = 500 cpu = 500