Push-based deploy step for LUSTRO (git_control=false): rsync services/node-agent/ and the host override to /opt/homelab/deploy/node-agent/ on the remote, then docker compose up --build via SSH. Guard by effect: skip push+build+up if node-agent container already running (docker ps filter, not command -v). Verify: container running + events appear in /opt/homelab/events/lustro/ within 90 s (confirms agent write path). Override (hosts/lustro/runtime/node-agent/docker-compose.override.yml): - group_add: ["991"] (docker GID on LUSTRO; 999 from base concatenated — harmless) - mem_limit: 256m (MagicMirror ~1.9 GiB; agent must be bounded) - /home/pi/.ssh:/root/.ssh:ro (not /home/oskar/.ssh — pi user) - /opt/homelab/deploy/node-agent:/repo:ro (no repo checkout on push-based node) - NODE_NAME=lustro, NODE_TYPE=sd_card, VPS_EVENTS_HOST=100.95.58.48 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
770 B
YAML
20 lines
770 B
YAML
services:
|
|
node-agent:
|
|
# Docker GID on LUSTRO is 991 (not the Debian default 999).
|
|
# Compose concatenates group_add lists; 991 is what gives socket access here.
|
|
group_add:
|
|
- "991"
|
|
mem_limit: 256m # RPi4 4 GiB; MagicMirror consumes ~1.9 GiB — agent must be bounded
|
|
environment:
|
|
- NODE_NAME=lustro
|
|
- NODE_TYPE=sd_card
|
|
- VPS_EVENTS_HOST=100.95.58.48
|
|
- VPS_EVENTS_USER=oskar
|
|
- VPS_EVENTS_PATH=/opt/homelab/events
|
|
- CHECK_INTERVAL=60
|
|
volumes:
|
|
# pi's SSH key for rsync event shipping to VPS (push-based node, no repo checkout)
|
|
- /home/pi/.ssh:/root/.ssh:ro
|
|
# Override ../.. from the base compose to the pushed deploy dir (no repo on node)
|
|
- /opt/homelab/deploy/node-agent:/repo:ro
|