homelab-codex-ws/hosts/vps/runtime/control-plane/docker-compose.override.yml

47 lines
1.8 KiB
YAML
Raw Normal View History

# Control-plane production overrides for the VPS deployment.
#
# NODE_ALIAS_MAP translates the node names that appear in raw event files
# (written by node agents / seed scripts) to the canonical names used in
# inventory/topology.yaml and hosts/*/services.yaml.
#
# Current live mapping (from /opt/homelab/events/ inspection):
# node-2 → chelsty (zigbee2mqtt / mosquitto / homeassistant node)
#
# Add further entries when new nodes come online and their event-source names
# differ from their topology names. Format is a single-line JSON object, e.g.:
# NODE_ALIAS_MAP='{"node-2":"chelsty","node-3":"piha"}'
#
# The executor inherits the canonical name from the action JSON written by the
# supervisor, so NODE_ALIAS_MAP is only required on the supervisor service.
#
# Memory limits: VPS has 4 GiB RAM, no swap. oom_score_adj -900 ensures the
# host kernel OOM-killer never targets control-plane containers. mem_limit
# provides a per-container cgroup ceiling so a leaking process is restarted by
# Docker before it can exhaust host memory.
services:
operator-ui:
mem_limit: 192m
oom_score_adj: -900
observer:
mem_limit: 192m
oom_score_adj: -900
# SHADOW-READ (Prometheus liveness cutover — etap 1). Optional: when set, the
# observer ALSO queries Prometheus up{} each cycle and LOGS mismatches vs its
# event-driven liveness (grep SHADOW_LIVENESS_MISMATCH), but NEVER switches
# source. Unset → disabled, observer unchanged (fail-open on any prom error).
# Uncomment to enable the ≥7-day parallel-run:
# environment:
# - PROM_SHADOW_URL=http://100.95.58.48:9090
supervisor:
mem_limit: 400m
oom_score_adj: -900
environment:
- NODE_ALIAS_MAP={"node-2":"chelsty"}
executor:
mem_limit: 64m
oom_score_adj: -900