I have a dev and prod instance of a microservice running on one machine. My ecosystem file gives them the same name. PM2 will not start the second instance when the first is running due to the name (presumably). Any ideas for a workaround here?
Thanks for the help... I ended up with this:
require("dotenv").config();
module.exports = {
apps: [
{
name: "app-" + process.env.environment,
script: "./app.js",
max_memory_restart: "150M"
}
]
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With