diff --git a/infra/boot.sh b/infra/boot.sh index 350119e..ebe416d 100755 --- a/infra/boot.sh +++ b/infra/boot.sh @@ -56,4 +56,13 @@ fi # ── Bring up the stack ───────────────────────────────────────────────────────── podman system migrate podman compose --env-file "$REPO_ROOT/.env" -f "$SCRIPT_DIR/docker-compose.yml" up -d + +# ── Restart deployed app containers ─────────────────────────────────────────── +podman ps -a --filter "status=exited" --format "{{.Names}}" \ + | grep '^hiy-' \ + | while IFS= read -r name; do + echo "[hiy] Restarting app: $name" + podman start "$name" || true + done + echo "[hiy] Stack is up." diff --git a/infra/start.sh b/infra/start.sh index 933d619..065cdd8 100755 --- a/infra/start.sh +++ b/infra/start.sh @@ -187,6 +187,14 @@ podman system migrate 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 +# ── Restart deployed app containers (stopped by podman system migrate above) ─── +podman ps -a --filter "status=exited" --format "{{.Names}}" \ + | grep '^hiy-' \ + | while IFS= read -r name; do + echo "[hiy] Restarting app: $name" + podman start "$name" || 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.