-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
From PR #157 review:
Rather than hardcoding each service we could use the
startnpm script for each workspace in theappsdirectory like this:npm run start --workspace=apps/**. Then if we ever want to spin up another service it wouldn't need to be updated here.This would require an update to the existing
startscripts to add the timeout logic.
The current CI "Start services" step hardcodes each app:
node apps/auth/dist/app.js > /tmp/auth.log 2>&1 &
node apps/backend/dist/app.js > /tmp/backend.log 2>&1 &
timeout 30 bash -c 'until curl -sf http://localhost:8083/healthcheck ...'
timeout 30 bash -c 'until curl -sf http://localhost:8081/healthcheck ...'To generalize this:
- Add a
start(orstart:ci) script to each workspace underapps/that starts the process, waits for the healthcheck, and backgrounds itself. - Replace the hardcoded CI step with
npm run start --workspace=apps/**(or similar). - Ensure the "Show service logs on failure" step still works with the new approach.
This way, adding a new service under apps/ requires no CI workflow changes.
Credit: @AyBruno
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels