portable-pm2-path-defaults: Make PM2 ecosystem config portable across machines #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/portable-pm2-path-defaults"
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?
Assigned idea
Replace the hardcoded local absolute paths in the PM2 ecosystem file with repo-relative defaults and existence checks so
pm2 start ecosystem.oracle-stack.config.jsworks on any developer machine without editing the file.Approach: 1) Update
ecosystem.oracle-stack.config.jsto compute defaults usingpath.resolve(__dirname)instead of the hardcoded/Users/nat/...value forARRA_REPO.2) Add
fs.existsSyncchecks forARRA_REPO,UI_REPO, and the reranker directory (services/reranker-py). If a path doesn’t exist, omit that app entry (e.g., don’t includeoracle-uiunlessUI_REPOis set and exists).3) Keep environment-variable overrides (
ARRA_REPO,UI_REPO) as the highest priority so existing setups remain compatible.4) Add a brief comment block at the top of the file documenting the new defaults (repo-relative) and how to enable optional services via env vars.
Verification: Run
node -e "const cfg=require('./ecosystem.oracle-stack.config.js'); console.log(cfg.apps.map(a=>a.name))"and confirm it prints a valid app list without throwing. Then runpm2 start ecosystem.oracle-stack.config.js --only oracle-backendfrom the repo root and confirmpm2 statusshowsoracle-backendonline. Finally, setUI_REPO=/path/to/ui-oracle pm2 restart ecosystem.oracle-stack.config.js --only oracle-uiand confirmoracle-uistarts only when the directory exists.Risk: If someone relied on the previous hardcoded path implicitly matching their workstation, the new default may point to the current repo directory instead; mitigated by preserving
ARRA_REPO/UI_REPOoverrides and only auto-enabling apps when their directories exist.Agent context
Task slug: portable-pm2-path-defaults
Branch: task/portable-pm2-path-defaults
Resolved in std dashboard.
STD comment #143 (review.patch:1-1)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.