fix(dev): make multi-instance commands and proxy routing instance-aware#284
Merged
fix(dev): make multi-instance commands and proxy routing instance-aware#284
Conversation
The dev stack had several issues that prevented non-zero instances from working correctly: 1. Vite proxy hardcoded to instance 0's backend (localhost:3211) 2. Justfile commands hardcoded to instance 0 PM2 app names 3. PM2 missing VITE_API_URL after PR #280 removal 4. Nginx had no docs about its instance 0 limitation 5. dev:infra script missing dev-ports Docker Compose overlay 6. Backend migration push failing on instance databases - Make vite.config.ts read VITE_API_URL from env for proxy target - Add instance resolution to justfile (env → .shipsec-instance → 0) - Make stop/clean only tear down infra for instance 0 - Filter logs to the active instance's PM2 apps - Re-add VITE_API_URL to PM2 config with instance-aware port - Document nginx instance 0 limitation in nginx.dev.conf - Add dev-ports overlay to dev:infra and dev:stack:stop scripts - Add --force to backend migration:push for instance databases - Simplify MULTI-INSTANCE-DEV.md to match actual working commands - Fix ESLint config to use projectService for project references Signed-off-by: Aseem Shrey <LuD1161@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
VITE_API_URLfrom envSHIPSEC_INSTANCEenv /.shipsec-instancefile / default 0VITE_API_URLto PM2 config with instance-aware port (removed by PR fix(pm2): use instance-aware env for frontend VITE_API_URL #280 but still needed by Vite proxy)nginx.dev.confdev:infra/dev:stack:stopscripts--forceto backendmigration:pushfor instance databasesprojectServicefor project references (unblocks lintingvite.config.ts)MULTI-INSTANCE-DEV.mdto match actual working commandsTest plan
just devstarts instance 0 as before (no regression)SHIPSEC_INSTANCE=1 just devstarts instance 1 on ports 5273/3311/apito port 3311 (not 3211)SHIPSEC_INSTANCE=1 just dev stopstops only instance 1 PM2 apps, leaves infra runningjust dev stop(instance 0) tears down infraSHIPSEC_INSTANCE=1 just dev logsshows only instance 1 logs