Skip to content

Deploy test/* branches to a dev slot, and point web-client at its merged main - #25

Merged
WesP10 merged 2 commits into
mainfrom
feat/dev-deploy-slot
Oct 24, 2026
Merged

WesP10 merged 2 commits into
mainfrom
feat/dev-deploy-slot

Conversation

@WesP10

@WesP10 WesP10 commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Two commits:

  1. Point web-client at its merged main (4da6c21 → 1f5835b). This picks up web-client Fix ESLINT Issues #11 (verify a stored session before showing the app) and Cornell SSO Integration #10 (favicon asset).
  2. Deploy test/* branches to a dev slot on EC2. Merging a PR into a test/* branch now runs the tests and deploys that branch's pinned web-client and cloud-services to a separate dev slot. Prod is not touched.

Dev slot

Prod Dev
Trigger PR merged into main PR merged into test/*, or a manual run of Deploy dev slot to EC2
Web nginx :4173 nginx :4174 → /var/www/hyperloop-gui-dev
API backend backend-dev on 127.0.0.1:8081 (proxied on the same origin)
Env file prod's /home/ubuntu/dev/cloud-services/.env.dev, copied from prod's on the first deploy and never overwritten after that
  • ci.yml: also runs on PRs into test/**. The prod deploy job now also requires the base branch to be main, and a new deploy-dev job runs when the base is test/*.
  • deploy-dev.yml: can be called from ci.yml or run by hand (workflow_dispatch). A concurrency group makes dev deploys run one at a time.
  • deploy-dev-to-ec2 action: builds web-client on the runner, writes deploy-info.txt (branch and commits, served at /deploy-info.txt), keeps the dev venv (it reinstalls only when requirements.txt changes), then waits for /health.
  • backend-dev is capped at MemoryMax=300M so it can't starve prod.

Before the first dev deploy

  • Port 4174 has to be reachable (EC2 security group, and Cloudflare if it sits in front).
  • The EC2 disk is nearly full. The dev slot adds a second venv and a second copy of the web build.
  • DEV_WEB_API_BASE_URL (repo variable) is optional. If it's empty, the dev build calls its own origin.

Merging this PR into main deploys prod as usual, which now includes web-client #11.

🤖 Generated with Claude Code

WesP10 and others added 2 commits October 24, 2026 12:17
Picks up web-client #11 (verify a stored session before showing the app)
and #10 (favicon asset).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merging a PR into a test/* branch now runs the tests and deploys that
branch's pinned web-client and cloud-services to a separate dev slot:
nginx on :4174 serving /var/www/hyperloop-gui-dev and proxying a
backend-dev service on 127.0.0.1:8081. Prod (:4173, backend) is untouched.

- ci.yml: run on PRs into test/**; gate the prod deploy on base main and
  add a deploy-dev job for test/* bases
- deploy-dev.yml: reusable + manual (workflow_dispatch) dev deploy,
  serialized with a concurrency group
- deploy-dev-to-ec2 action: builds web-client on the runner, ships
  cloud-services source, keeps the dev venv and .env.dev (seeded from
  prod's env on first deploy), and waits for /health
- nginx and systemd units for the dev slot; backend-dev is capped at
  300M so it cannot starve prod

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 24, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@WesP10
WesP10 merged commit 3c19ed4 into main Oct 24, 2026
6 checks passed
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.

2 participants