I’m trying to run PM2 for my Node application that is hosted on the Digital Ocean App Platform. I have no issues running my app with node index.js but when I try to run pm2 start index.js I end up with a failed deployment. I haven’t seen anywhere saying otherwise, but is it possible to use PM2 on the App Platform?
Error message: Component Issues app_name failed to deploy
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi idriskhenchil,
To run pm2 on App Platform you must tell it to run in the foreground, that way the health check knows your app is running and the deployment was successful. To run pm2 in the foreground use the command:
pm2 start index.js --no-daemon
Best, Moises
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.