chore(deploy): build & (re)start microservices on release tag #102
No reviewers
Labels
No labels
bug
claude-failed
claude-pr
claude-queue
claude-working
epic
feature
interactive
portal
triaged
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: shad0w/pelagia-portal#102
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "chore/deploy-microservices"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The
v*tag deploy (deploy.yml) only built and restarted the Next app (ppms). The standalone Playwright services — GstService / EpfoService / PdfService — were never built, created, or restarted by automation; the tag dropped their source on the host but nothing provisioned them. This makes them first-class in the release.What
ecosystem.config.js(repo root) — pm2 definitions forgst-service(3003),epfo-service(3004),pdf-service(3005). It registers only services whose source is checked out (keyed onpackage.json), so a not-yet-merged service is skipped and adopted automatically once its PR lands (e.g. PdfService from #101). Ports are fixed here; secrets are read from the env at pm2-invocation time.deploy.yml— after the app restart, a new step:App/.env(PDF_SERVICE_TOKEN,ALLOWED_ORIGIN,EPFO_LIVE) — neverPORTor the runner's ephemeralFORGEJO_TOKEN;npm install+npx playwright install chromium+npm run buildfor each present service;pm2 startOrReload ecosystem.config.js --update-env— creates the processes on the first release, reloads them on every release after — thenpm2 save;:3003/:3004/:3005(/health→ 200).automation/README.md— documents the flow and the one-time alignment step.Notes / caveats
pm2 delete <old> && pm2 save) so the canonical process can bind its port — otherwise the new one EADDRINUSE-clashes. I can't know the current names from here, hence the manual step.playwright install chromium(browser binary only). The very first PdfService run also needs the OS libs (playwright install --with-deps chromium, needs sudo) — already present on the host since Gst/Epfo use Playwright.npm install(notci) because not every service carries a lockfile (EpfoService doesn't on master).ppmsitself is untouched — its deliberate non---update-envrestart (FORGEJO_TOKEN handling) stays exactly as-is.🤖 Generated with Claude Code