Skip to content

refactor(dev): derive Vite proxy target from SHIPSEC_INSTANCE#285

Merged
LuD1161 merged 1 commit intomainfrom
LuD1161/use-shipsec-instance-for-vite-proxy
Feb 13, 2026
Merged

refactor(dev): derive Vite proxy target from SHIPSEC_INSTANCE#285
LuD1161 merged 1 commit intomainfrom
LuD1161/use-shipsec-instance-for-vite-proxy

Conversation

@LuD1161
Copy link
Contributor

@LuD1161 LuD1161 commented Feb 13, 2026

Summary

  • Replaces VITE_API_URL env var with direct computation from SHIPSEC_INSTANCE in vite.config.ts
  • Removes the redundant VITE_API_URL from the PM2 frontend env block, passes SHIPSEC_INSTANCE instead
  • SHIPSEC_INSTANCE is already the single source of truth for instance identity — no need for an intermediary env var

Verification

  • just dev → instance 0, Vite proxy targets localhost:3211
  • SHIPSEC_INSTANCE=1 just dev → instance 1, Vite proxy targets localhost:3311
  • Instance 0 through nginx still works (nginx routes /api directly to backend, bypassing Vite proxy)

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@LuD1161 LuD1161 force-pushed the LuD1161/use-shipsec-instance-for-vite-proxy branch 2 times, most recently from ccfdac7 to 08a9366 Compare February 13, 2026 00:44
Compute both the frontend port and backend proxy target directly from
SHIPSEC_INSTANCE in vite.config.ts, removing VITE_API_URL and the
--port/--strictPort CLI args from pm2.config.cjs. SHIPSEC_INSTANCE is
the single source of truth for instance identity.

Signed-off-by: Aseem Shrey <LuD1161@users.noreply.github.com>
@LuD1161 LuD1161 force-pushed the LuD1161/use-shipsec-instance-for-vite-proxy branch from 08a9366 to a693a1e Compare February 13, 2026 00:49
@LuD1161 LuD1161 merged commit 120e5a2 into main Feb 13, 2026
3 checks passed
@LuD1161 LuD1161 deleted the LuD1161/use-shipsec-instance-for-vite-proxy branch February 13, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant