Add admin-approved Neon previews on EC2 with automatic cleanup - #225
Closed
jerryzhou196 wants to merge 1 commit into
Closed
Add admin-approved Neon previews on EC2 with automatic cleanup#225jerryzhou196 wants to merge 1 commit into
jerryzhou196 wants to merge 1 commit into
Conversation
jerryzhou196
marked this pull request as ready for review
September 7, 2026 15:18
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.
Frontend previews currently lack an isolated running backend. This adds a manual, admin-approved deployment workflow that resolves exact frontend/backend commits, then provisions a Neon database branch and bounded API/Hasura containers on the existing EC2 instance. It creates a Vercel review URL whose API/GraphQL rewrites point to that PR's backend.
DATABASE_URLsupport to Go while preserving existing Postgres configuration, plus a synthetic Neon baseline bootstrap helper.Start review with the setup and validation guide, then the GitHub workflow and
preview/controller.py. The guide covers Neon, a dedicated Vercel project, restricted SSH, wildcard HTTPS, required admin reviewers, and the expiry timer. No cloud deployment or production configuration change has been performed.Validation: 18 controller tests; full Go suite in the API Docker build; Hasura image build; actionlint; disposable Docker integration covering real migrations, signup, login, creating/editing reviews, and teardown. These checks also run in the added PR workflow.
Live Neon/Vercel/EC2 validation requires the documented one-time setup. This infrastructure does not fix Google OAuth or alter the frontend's existing local-only Playwright runner. Container resource limits are not a security boundary for hostile PR code on a production host. GHCR build artifacts remain in the registry; active preview resources and EC2 images are cleaned up.