services: node-agent: environment: - NODE_NAME=vps - CHECK_INTERVAL=60 # No NODE_TYPE here on purpose: `vps` is in none of node_agent.py's # LTE_NODES / SD_CARD_NODES / AI_NODES sets, so _resolve_node_type() falls # through to "standard" — dangling images + stopped containers + build # cache, plus the control-plane filesystem rotation (that one is gated on # node_name == VPS_NODE_NAME, not on node_type). This is the pre-M1 state. # host network mode: node-agent on VPS shares the host's network namespace # so that localhost:18180 resolves to the control-plane's exposed port. # Without this, localhost inside the container is the container's own loopback # and the _check_control_plane_health() probe would always fail. network_mode: host # HARD memory ceiling: node-agent mounts /opt/homelab/events/ (page cache) # and may accumulate Python RSS over hours; 640m cap ensures it is killed and # auto-restarted by Docker before consuming host memory. oom_score_adj -900 # prevents the host kernel OOM-killer from picking it as a global victim. mem_limit: 640m oom_score_adj: -900