Allow PM2 CLI to recognize custom ecosystem filenames like ecosystem.dev.js
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- cli
Research direction
Start with the pm2 start CLI handling described in the issue and reproduce it using ecosystem.dev.js with the supplied example. Trace how ecosystem.config.js is identified and how apps are loaded. Done means the custom filename is treated as an ecosystem configuration and both defined apps are spawned rather than the file being run as a script.
Written by the indexing model from the issue text.
Description
Description:
Currently PM2 only treats files named exactly ecosystem.config.js
as valid ecosystem configuration files. If I run pm2 start ecosystem.dev.js,
PM2 interprets it as a script instead of a config file and doesn't load all defined apps.
Use case:
I maintain multiple environment-specific config files (ecosystem.dev.js,
ecosystem.test.js, ecosystem.prod.js). I'd like to be able to start/select them via CLI
(e.g. pm2 start --config ecosystem.dev.js or with --config-file),
similar to how many tools allow a --config flag.
Expected behavior:
- PM2 should recognize or allow specifying custom config filenames
- Treat them same as
ecosystem.config.js, i.e. load all apps
Fictive example: ecosystem.dev.js
const path = require('path');
module.exports = {
apps: [
{ name: 'app-dev', cwd: path.resolve(__dirname, '../../backend'), script: 'node server-dev.js' },
{ name: 'worker-dev', script: 'node worker-dev.js' }]};
Expected pm2 start ecosystem.dev.js to spawn both apps—not run the file itself.
pm2 --version
6.0.8
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Unitech/pm2
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Errors Open
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100