Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-i # does not start cluster mode! #68

Open
spacepirate0001 opened this issue Mar 13, 2019 · 1 comment
Open

-i # does not start cluster mode! #68

spacepirate0001 opened this issue Mar 13, 2019 · 1 comment

Comments

@spacepirate0001
Copy link

Trying to run my nodejs app with pm2 in cluster mode. The app works fine with:
CMD ["pm2", "start", "yarn start", "--no-daemon"] start 1 instance in fork_mode

But with:
CMD ["pm2", "start", "yarn start", "-i", "10", "--no-daemon"] 10 instances are started, yet still in fork_mode and I get errors regarding ports being already in use. How to force cluster mode? Is there an argument I'm missing?

@juliocesarcoding
Copy link

your problem is on command at dockefile.
Try to add this params in CMD line.
CMD ["pm2-runtime", "your-confir-file.js"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants