|
|
|
|
|
by solardev
813 days ago
|
|
> I've got my NextJS app setup through Github action (trigger on push to a prod branch) that deploys as a dockerized container to my VPS and a preview branch that deploys to a separate nginx restricted firewalled site for purposes of previewing. That seems like a pretty big pain, though, compared to a single click on Vercel and you get that same functionality for free. What's the advantage of doing it yourself? Each of those steps is quite a lot of work (few hours the first time? sure you can automate it for reuse later, but it still sounds much more of a hassle than the nice Vercel GUI). And what happens when part of the stack needs updates? (The VPS, or DOcker, or a Github action or one of its dependencies, or Nginx, or the firewall, or the rules...) > Native vercel serverless functions running in Vercel are also highly restricted (10 seconds in hobby, and no more than 60 seconds in Pro) which I also don't have to worry about. That's a looooong time for a serverless func to run. Curious, what do you use them for? |
|
I also just don't like handing the keys to the kingdom over to Vercel as it were (just a personal preference really). I'm working on migrating over to a privately instanced Gitea so that I don't have to depend on Github either for my deployments but that's still in the works.
So I actually use serverless functions as ad-hoc "workers" if I don't feel like setting up a full fledged backend API - so sometimes they'll be working for upwards of a minute on a request and then lodge the final results in a notification-redis. It's not really what serverless functions are intended for, but... it's nice to sometimes not have to deal with building an entirely separate backend.
Since I control the VPS, I can easily spin up more resources to scale without worrying about Vercels payment options. It also makes it easier to migrate somewhere else if I want to since its dockerized - trivial to move to Google Cloud, Digital Ocean, AWS, etc.
A friend of mine whose project sort of blew up and went viral also said that while the autoscalibility of Vercel was very nice - it was a bit of a double edged sword, he mentioned that it was extraordinarily difficult to figure out which routes and files werer contributing to his high usage on his bill. Maybe things have changed, that was a few years back.