Laravel Podman

Vite

Pausing Vite

Pods' suspend can pause an app's Vite dev server in development while nobody visits it, and start it again on the next visit. Without this package, that first page fails: when the dev server stops, the Laravel Vite plugin removes public/hot, so @vite looks for a production build, which development doesn't have, and Laravel throws ViteManifestNotFoundException.

With the package installed, a browser gets a short Starting… page instead, with status 503 and Retry-After: 2, which reloads itself every 2 seconds. The visit that got it wakes Vite through Pods' proxy, Vite writes public/hot again within seconds, and the next reload shows the app. There's nothing to set up.

It's on only when APP_ENV is local, since a missing manifest in production is a broken build, not a paused server. Set PODMAN_VITE_STARTING_PAGE=true to turn it on in another environment, such as development, or false to turn it off. It leaves JSON requests and every other error to Laravel.

To pause Vite with Pods, add its container to the suspend block of your app's pods.yml, next to the queue worker:

suspend:
    containers: [my-app-queue, my-app-vite]
    after: 60min

Hot reload talks to the dev server over a WebSocket, which Pods counts as a visit only when it closes. Pick a long quiet time, so Vite doesn't pause while you edit with the page open.