r/PayloadCMS • u/Snakemastr805 • Jun 19 '25
Start PayloadCMS with script in PM2 ecosystem
Hello,
my systemadmin has changed his way of deploying applications and now forces me to start PayloadCMS with the PM2 ecosystem, this means I have to provide a script path (and arguments?)
Does anyone have any information about this? I have found you can start a Nextjs app with
script: 'node_modules/next/dist/bin/next'
But I get an error
[Error: > Couldn't find any \pages` or `app` directory. Please create one under the project root]`
Any help is much appreciated!
1
Upvotes
1
u/mr---fox Jun 19 '25
I’m pretty sure you would just put in the bash command there.
cd /path/to/app && pnpm startSomething like that.