Hi there! I'm new to Payload, I've been trying to deploy an instance in a DigitalOcean Droplet, but I'm failing miserably.
I followed the instructions for the Droplet preparation, and have it working, but I don't find any resources on what to do next.
I've been trying to clone the repo, but running 'npm run build/serve' isn't working. It's there some other documentation that I can follow?
Hey @akacronos! What steps have you followed so far? Is your repo cloned on your droplet? Have you run
in the project folder after cloning?
I don't know how but it works now! Well, kinda, I can build and serve the repo, but I don't know how to let it run. I know there's is a package called pm2 (already installed from the tutorials) but I don't know which file should I run it with to serve payload.
(I'm a Product Designers that can do front-end, I'm don't know well back-end stuff, sorry 😅)
again i think i found the solution:
pm2 start server.js --env production
it's running fine.
you got it! pm2 is what I would suggest to manage your node processes, a script
pm2 start npm --name stage -- run serve --time
. This example starts an NPM script called
and aliases it to name
. You can then run commands like
pm2 restart stage
So if you make changes to your repo and pull those into your server, you will want to run
yarn build && pm2 restart stage
for your changes to appear!
re: not knowing server stuff - I get that, that used to be me. While it is a mind shift from the FE, with practice it makes sense. Understanding how to manage a server, even in a basic sense is invaluable 🚀
I'm going to try this config, thanks!
I'm probably in a similar boat as @akacronos ... trying to deploy a droplet. But I'm getting 404's. Everything works fine locally.
did you manage to deploy to digitalOcean? need help?
Would be cool if there was a Payload 1 click droplet install template