feat: seed Reverb apps from REVERB_SEED_APPS env at boot#1
Merged
Conversation
Pods now bootstrap with their app set already provisioned — no race with the admin API. Seed runs as a phpeek-pm oneshot after migrate, idempotent on re-run (upsert by id), and leaves admin-API-created rows untouched. JSON env schema per entry: id, key, secret, name (required); allowed_origins, enable_client_messages, max_connections, max_message_size, options (optional). Enables GitOps-style bootstrap for the Cbox realtime control plane — declare apps in cbox-infra Sealed Secrets, redeploy to rotate secrets or allowed origins.
Reverb's Application::__construct gained two args between minor versions (acceptClientEventsFrom + rateLimiting before options). DatabaseApplicationProvider now passes them, mapping the legacy enable_client_messages bool to "all" / "none", or honouring options.accept_client_events_from if set. Also refreshes laravel/framework, reverb, sail, tinker, carbon, collision, termwind, pest-plugin-laravel — no security advisories, no other behaviour changes. Boost guideline files regenerated by post-update hook.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
php artisan reverb:seed-from-envartisan command that reads a JSON array fromREVERB_SEED_APPSand upserts rows intoreverb_applications. Idempotent on rerun (upsert by id), no-op when env empty.phpeek-pm.yamlas a oneshot betweenmigrateandphp-fpmso pods come up with their app set already provisioned — no race with the admin REST API.DatabaseApplicationProviderupdated for Reverb 1.x's newApplicationconstructor signature (acceptClientEventsFrom+rateLimitingargs). Legacyenable_client_messagesboolean maps to"all"/"none"; override viaoptions.accept_client_events_fromfor the new"members"mode.composer updaterefresh — no security advisories, no other behaviour changes.Enables GitOps-style bootstrap for the Cbox-internal realtime instance (and future per-customer provisioned instances): declare apps in a Sealed Secret, redeploy to rotate keys/secrets/allowed_origins.
Per-entry schema:
idkeysecretnameallowed_origins["*"]enable_client_messagesfalsemax_connectionsnullmax_message_size10000optionsnullTest plan
php artisan test— 61 passing (10 new for the seed command + 51 existing including the regression covered by the Reverb-signature fix)vendor/bin/pintcleankubectl apply -f cbox-infra/apps/realtime-internal/, expect pod Ready and/api/appsreturning the 4 seeded apps