diff --git a/infra/start.sh b/infra/start.sh index 6849780..1d453bc 100755 --- a/infra/start.sh +++ b/infra/start.sh @@ -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.