I have a simple Spring Boot app using Postgres that I'd like to deploy but I'm finding it to be surprisingly difficult to figure out where exactly it should be deployed. This is still just a hobby project so my biggest priorities are (1) low and capped cost and (2) ease of setup and deploy.<p>AWS was the first place I looked, but the pricing is pretty confusing so I'm not sure how I would guarantee that costs would stay below a certain amount. It also seems like there are a number of similar options to look at and it's not clear to me which is best - EC2, Fargate, Beanstalk, App Runner...<p>Google Cloud also has a few options, the main two I'm aware of are Cloud Run and App Engine. Main concern here is again the potential for unintended costs. I've seen horror stories like "We Burnt $72K testing Firebase + Cloud Run and almost went Bankrupt" [1]. Of course that's a fairly novel outcome, but it shouldn't even be in the cards that charges exceed my intended cap.<p>I've heard good things here and elsewhere about DigitalOcean droplets and Render.com but is it really $20+/mo for just 2gb of RAM? Not sure how much RAM I actually need though and the 512MB for the starter / free tiers might be fine.<p>I've also heard a lot of praise for Heroku, though also that it's been slowly going cold since getting acquired by Salesforce.<p>I've also heard people suggest just renting a dedicated server from places like https://www.hetzner.com/, https://www.kimsufi.com/us/en/index.xml, or https://lowendbox.com/, though that seems like a good deal more work that I'm looking for as someone with minimal devops experience.<p>Right now I'm planning on just starting with the free tier for Render.com since that also seems like a convenient way to setup a cheap/simple Postgres instance. Would otherwise go the same route with Heroku or DigitalOcean.<p>Are there any options I didn't consider here? Anyone else have hobby/POC/low-scale Spring Boot deployments and like their setup?<p>[1] https://blog.tomilkieway.com/72k-1/
I have a dozen Spring Boot apps deployed on Heroku, only a couple of which I need instant response from, so pay $7 for the hobby level for those. The rest run on the free hours that you get each month.<p>Deployment is almost trivial, as it recognizes the Maven or Gradle file, and, other than specifying the version of Java you need, it does everything else automatically.<p>I have been trying out <a href="https://railway.app/" rel="nofollow">https://railway.app/</a> and will be moving over a bunch of my Spring Boot projects to there. The cost is predictable (and low), and deployment is as easy as Heroku.<p>You can check out the source code for one of my main projects at <a href="https://github.com/jitterted/mobreg" rel="nofollow">https://github.com/jitterted/mobreg</a>. <a href="https://github.com/jitterted/mobreg/blob/master/system.properties" rel="nofollow">https://github.com/jitterted/mobreg/blob/master/system.prope...</a> is the only Heroku-specific file I have. It uses GitHub actions to build and run tests, and only if the tests pass does Heroku pick it up and deploy.
If you'd be willing to run your own VPS on DO, you might also like Tornado VPS (formerly known as prgmr). It's cheap, performance is decent, and there are no overages.<p>AWS Lightsail might be a good option as well.<p>These would have the same downsides as some of the other options you mentioned like hetzner, though. Quite a bit of manual work to get up and running.<p>Your app might work fine on the free tier of Azure App Service, though you'd probably have to pay a little for a managed Postgres database. The nice thing is that there would be no DevOps or sysadmin required. Deploy would probably be a single click in your IDE.