-
|
Hi All i need help to run my next js turborepo on nginx server with pm2 if any one can share a sample example of doing that will be very helpful. |
Beta Was this translation helpful? Give feedback.
Answered by
JefteCaro
May 25, 2023
Replies: 1 comment 2 replies
-
|
Generate the pm2 ecosystemGenerate the module.exports = {
apps: [
{
script: "index.js",
watch: ".",
},
{
script: "./service-worker/",
watch: ["./service-worker"],
},
],
deploy: {
...
},
};Configure your module.exports = {
apps: [
{
namespace: "my-turborepo-project",
name: "web",
script: "yarn start --port 3000",
cwd: "./apps/web",
watch: ".",
},
{
namespace: "my-turborepo-project",
name: "docs",
script: "yarn start --port 3001",
cwd: "./apps/docs",
watch: ".",
},
],
...
};Build your turborepo
Run the
Then, you can configure your |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
anthonyshew
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generate the
pm2config file(PM2 Ecosystem File)
Generate the
ecosystem.config.jsfile in yourturboreporoot directory. and you will get this sample config file:Configure your
turborepoapps in theecosystem.config.jsfile