job "poe-sensor" { region = "global" datacenters = ["hs"] type = "service" namespace = "production" meta { version = "20250617" } group "sensor-bridge" { count = 1 # Network configuration - using bridge mode with port mapping for better isolation network { mode = "bridge" port "health" { static = 8080 to = 8080 } } # Restart policy - more lenient for startup issues restart { attempts = 5 interval = "30m" delay = "30s" mode = "fail" } # Update strategy update { max_parallel = 1 min_healthy_time = "120s" # Increased from 60s healthy_deadline = "10m" # Increased from 5m progress_deadline = "15m" # Increased from 10m auto_revert = true canary = 0 } service { name = "${NOMAD_JOB_NAME}" port = "health" tags = [ "sensor", "modbus", "mqtt", "iot", "health-check" ] check { type = "http" path = "/health" interval = "30s" # Reduced frequency timeout = "30s" # Increased timeout initial_status = "critical" # Start as critical until proven healthy check_restart { limit = 3 grace = "30s" # More time for graceful shutdown } } } task "poe-sensor" { driver = "docker" config { image = "registry.dev.meisheng.group/ms_qc_db:20250409" command = "/bin/bash" args = [ "-c", <