ashleyrudland / nextjs_vps

NextJS VPS Example
https://vps.ashleyrudland.com
287 stars 17 forks source link

Do we need Vercel? Can we just run our NextJS apps on a VM? Maybe all our apps on one machine?

I love NextJS, but I don't like Vercels pricing. It seems nuts to me and it seems many other people do too. So I spent a few hours playing with this and Digital Ocean Hetzner Cloud (€3.30/mo 🤣) to see what was possible.

All thanks goes to kamal and @ImSh4yy, I built this using his post 🙏

What's the objective here?

Figure out if we can have all the requirements of most indie hacker apps on a little VM instead of Vercel?

Here's the list of to dos:

What's not the objective?

How does this auto deploy?

Basically GitHub actions run on each commit to main, builds image using Docker, uploads then Kamal connects to machine via SSH (with passphrase), then reboots app with new code.