fix: reconnect app containers to hiy-net after platform restart

compose down destroys hiy-net and evicts running hiy-* containers
from it. compose up recreates the network but leaves those containers
disconnected, making them unreachable until a redeploy.

After compose up, reconnect all running hiy-* containers to hiy-net.

https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
This commit is contained in:
Claude 2026-03-24 12:42:26 +00:00
parent 31944d128b
commit a8e73df2c3
No known key found for this signature in database

View file

@ -182,6 +182,15 @@ make -C "$SCRIPT_DIR" build
podman compose --env-file "$REPO_ROOT/.env" -f "$SCRIPT_DIR/docker-compose.yml" down
podman compose --env-file "$REPO_ROOT/.env" -f "$SCRIPT_DIR/docker-compose.yml" up -d
# ── Reconnect deployed app containers to hiy-net ───────────────────────────
# compose down destroys hiy-net, evicting any running hiy-* containers.
# compose up recreates the network but doesn't reconnect them automatically.
podman ps --format "{{.Names}}" \
| grep '^hiy-' \
| while IFS= read -r name; do
podman network connect hiy-net "$name" 2>/dev/null || true
done
# ── Install systemd user service for auto-start on boot ───────────────────────
# Uses a user-level (rootless) service so Podman's UID namespace is preserved.
# loginctl enable-linger lets the service start even without an active login.