Unitech / Unitech/pm2

Can I change the ecosystem.config.yml field by cli?

Open
#4,785 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

I want to manage my node process use pm2 with ecosystem.config.yml. But I want to change some field such as instances, watch etc. by cli.

For example, only start one in the development environment, but start multiple in the test and production environments. I want to use it like this:
in development:

pm2 start ecosystem.config.yml --env development -i 1

In production:

pm2 start ecosystem.config.yml --env production

How can I do this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the pm2 start CLI path for ecosystem.config.yml, including how --env and -i are currently parsed. Clarify whether command-line values should override file fields and how this should interact with development and production environments. Done means the requested commands have defined, tested behavior or the limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, yaml
Domain
cli, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.