Try to remove ecosystem #33
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Can you do something to try to remove the ecosystem dependency and instead use pnpm for running all the processes at the same time for development?
Now I understand the picture. Let me verify the current dev flow works through pnpm and that
ecosystem.config.jsis truly orphaned:Done. Here's what I changed for #33:
Investigated first:
ecosystem.config.js(PM2) was the only PM2 artifact — PM2 is not a dependency of any manifest, nothing in the Dockerfiles, workflows, compose or docs referenced it, and its two apps rannpm start, a script neitherbackendnorfrontenddefines. Production is already served by the compose images (CMD node src/index.js/node .output/server/index.mjs), and development already fans out through the pnpm workspace viapnpm dev→pnpm --filter ./<pkg>. So the file was dead weight, not a working fallback.Changes
ecosystem.config.js(git rm) — PM2 and its ecosystem file are gone; development ispnpm dev, which starts backend, frontend, the Discord bot andscripts/run-foundry.jsat the same time through the workspace filters, andpnpm dev:backend|dev:frontend|dev:discord-botstart one process each.tests/pnpm-workspace.test.js— addedPM2 plays no part in running the monorepo: asserts noecosystem.*config file comes back, no manifest (root or app) depends onpm2, and neither the Dockerfiles,docker-compose.ymlnor the two workflows mention PM2. The existing test that pinspnpm devto run all apps through the workspace already guards the pnpm side, so I leftconcurrentlyin place: it only labels the streams and ties the processes together (-k), it can't be replaced by a barepnpm -r --parallelwithout losing the non-package Foundry launcher and the backend-onlyDEBUG=*.AGENTS.md— §2 now lists the pnpm commands instead of the stalenpm --prefixones, and states explicitly that there is no PM2/ecosystem.config.js, thatpnpm devruns all dev processes together and production runs from the compose images; the corresponding clause was dropped from the landmine list (§8.7) since it no longer applies. The CORS / committed.env.productionnotes there are untouched.Verification: I ran the suite —
node --test tests/passes 71/71 (9/9 inpnpm-workspace.test.js). I also confirmed the new test fails whenecosystem.config.jsis restored, then deleted it again. I did not runpnpm devitself: pnpm isn't available in this sandbox and the workspace has no installed dependencies, so the dev flow is verified by reading the manifests, not by execution.Implementation is ready for review: #36