Try to remove ecosystem #33

Closed
opened 2026-10-14 17:46:34 +00:00 by Syndria98 · 3 comments
Owner

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?

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?
Syndria98 added the ai-ready label 2026-10-14 17:46:34 +00:00
Agent added the working label 2026-10-14 17:46:34 +00:00
Collaborator

Now I understand the picture. Let me verify the current dev flow works through pnpm and that ecosystem.config.js is truly orphaned:

Now I understand the picture. Let me verify the current dev flow works through pnpm and that `ecosystem.config.js` is truly orphaned:
Collaborator

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 ran npm start, a script neither backend nor frontend defines. 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 via pnpm dev → pnpm --filter ./<pkg>. So the file was dead weight, not a working fallback.

Changes

  1. Removed ecosystem.config.js (git rm) — PM2 and its ecosystem file are gone; development is pnpm dev, which starts backend, frontend, the Discord bot and scripts/run-foundry.js at the same time through the workspace filters, and pnpm dev:backend|dev:frontend|dev:discord-bot start one process each.
  2. tests/pnpm-workspace.test.js — added PM2 plays no part in running the monorepo: asserts no ecosystem.* config file comes back, no manifest (root or app) depends on pm2, and neither the Dockerfiles, docker-compose.yml nor the two workflows mention PM2. The existing test that pins pnpm dev to run all apps through the workspace already guards the pnpm side, so I left concurrently in place: it only labels the streams and ties the processes together (-k), it can't be replaced by a bare pnpm -r --parallel without losing the non-package Foundry launcher and the backend-only DEBUG=*.
  3. AGENTS.md — §2 now lists the pnpm commands instead of the stale npm --prefix ones, and states explicitly that there is no PM2/ecosystem.config.js, that pnpm dev runs 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.production notes there are untouched.

Verification: I ran the suite — node --test tests/ passes 71/71 (9/9 in pnpm-workspace.test.js). I also confirmed the new test fails when ecosystem.config.js is restored, then deleted it again. I did not run pnpm dev itself: 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.

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 ran `npm start`, a script neither `backend` nor `frontend` defines. 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 via `pnpm dev` → `pnpm --filter ./<pkg>`. So the file was dead weight, not a working fallback. **Changes** 1. **Removed `ecosystem.config.js`** (`git rm`) — PM2 and its ecosystem file are gone; development is `pnpm dev`, which starts backend, frontend, the Discord bot and `scripts/run-foundry.js` at the same time through the workspace filters, and `pnpm dev:backend|dev:frontend|dev:discord-bot` start one process each. 2. **`tests/pnpm-workspace.test.js`** — added `PM2 plays no part in running the monorepo`: asserts no `ecosystem.*` config file comes back, no manifest (root or app) depends on `pm2`, and neither the Dockerfiles, `docker-compose.yml` nor the two workflows mention PM2. The existing test that pins `pnpm dev` to run all apps through the workspace already guards the pnpm side, so I left `concurrently` in place: it only labels the streams and ties the processes together (`-k`), it can't be replaced by a bare `pnpm -r --parallel` without losing the non-package Foundry launcher and the backend-only `DEBUG=*`. 3. **`AGENTS.md`** — §2 now lists the pnpm commands instead of the stale `npm --prefix` ones, and states explicitly that there is no PM2/`ecosystem.config.js`, that `pnpm dev` runs 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.production` notes there are untouched. **Verification:** I ran the suite — `node --test tests/` passes 71/71 (9/9 in `pnpm-workspace.test.js`). I also confirmed the new test fails when `ecosystem.config.js` is restored, then deleted it again. I did not run `pnpm dev` itself: 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.
Collaborator

Implementation is ready for review: #36

Implementation is ready for review: https://git.aranroig.com/Syndria98/dragonroll/pulls/36
Agent added help wanted and removed working labels 2026-10-14 17:50:32 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Syndria98/dragonroll#33