About a year ago I made The Weather Scout as a side project to make exploring the NOAA Climate Normals weather data a better user experience (the NOAA UX is terrible). Have a couple hundred backpackers who have used it like me to plan trips in the future and get the right gear for it.
It is hosted on render.com which I highly recommend, it was quite easy once you go through their docs. This was a way for me to dive deep into LiveView as well (which is used for interop with the javascript map and charts). It was really nice to just use some vanilla JS and the rest in Elixir/Phoenix.
For static sites: cloudflare, netlify. For free
For sites with a backend/db: render.com / digitalocean
Both render & digitalocean offer managed db/ auto backup. I mainly use digitalocean, but I'd like to try render more as they offer cron as a service, with failure notifications so u can backup all your clients data offline automatically, more peace of mind.
If you're running on the web directly from a VPS you control (and not, say, a service like Heroku or Render.com) then you should:
You'd only need a /dist folder if there's some need to transpile (for example, if you're writing in Typescript, and would prefer to run the transpiled Javascript in production.)
If you google a bit, you may find some good tutorials on this. For example, DigitalOcean has good tutorials that can help you with the production setup and similar security concerns.
DigitalOcean, Linode and Vults are the first that come to mind, they should all be rock-solid choices and if you want to keep it on the cheap side, they all offer first 1-2 months free.
Security is another issue because Heroku takes care of it, those other companies give you server but you have to take care of security and stuff. I'm not sure, but I think some of them offer managed servers too where they take of security but they are a little bit pricier. You can also check Render.com, I think they offer some managed services too.
Great question, as I spent days researching for a proper solution. In the end I decided to go with the seemingly most smoothest and lean option which was to use Render.com for the hosting. They allow unlimited wild-card domains which is amazing.
You should definitely consider Render if you application is dockerized. I use it for GummySearch and absolutely love it! Will cost you $14/mo for a webserver and postgres database. Static sites are free.
FWIW Heroku restarts dynos periodically, automatically. If you're relying on your worker process to "always be there", Heroku might not be the best option for that.
In terms of what you can do differently — from what I can tell from your question (correct if I'm wrong), your worker has one task and that task is to scrape a list of URLs? You could try breaking the work up into smaller chunks. Say, one scaping task per website. You'd need something — another task — that periodically loops through all websites you want to scrape and enqueue a scraping task for each one. That way, if the worker gets restarted, because Heroku decides to cycle your dyno, the work will resume once the worker dyno is back up (assuming you have queue persistence and appropriate handling of restarts).
Another option is to move off of Heroku and use a different platform. I have been recommending render.com which I use for some projects (no affiliation though). They don't restart their nodes and your worker would just keep running. It's also cheaper than Heroku.
Heroku is indeed extremely quick and easy for getting going. I use Heroku myself and am happy with it.
Another option is render.com, which is like Heroku, but cheaper. It's a relatively new service, so there's going to be some kinks. But the team is very responsive and it seems to be gaining traction. Here's how you get started with Flask on Render.
Have you tried Render ? It has great options for small, low traffic sites and would take a lot of the deployment work out for you. Unless you want to use Azure as a learning experience to prep for work.
This is why we built Render (render.com), which is a modern Heroku alternative. Most applications shouldn't need DevOps expertise to host in the cloud. Render plugs into GitHub/GitLab and keeps your app updated on every commit. No DevOps needed.
> 0.25$ per gig of storage. But please don’t quote me on that.
That looks right, thanks. https://render.com/pricing
If we go with strapi on render.com, we might end up using a remote db at supabase or one of the other cloudy db providers with a generous free tier.
Yes I know exactly what you mean! Locking down SSR and DSG to Gatsby cloud is a pain! While I use Gatsby Cloud for my own purposes, I did find it possible to get these features working by running `gatsby serve` on render.com. It was shakey due to memory leaks but it did work. This is the one feature they desperately need to sort out!
I think its important to remember that it's early days for SSR and DSG on Gatsby. They probably will keep them locked in to Gatsby Cloud for a little while and then open them up to other platforms in 6 months? Thats my guess anyway.
Cloud foundry on IBM cloud is working well for me. Other than that there are other PaaS services like https://fly.io/ or https://render.com/. If you don't need real VPS access and might require easy horizontal scalability, I guess especially as a startup, check out PaaS as you have limited time and people to cover those topics.
If your sites don't need a backend, just deploy to Vercel or Netlify. Another option to use Render.com, it's free and no cold start.
A tip for your portfolio site, get rid of the contact form and just deploy the site as a static site. That would eliminate the need of having a server to handle your email endpoint. That simplifies your deployment process significantly.
As explained, I have 2 apps to host (one SPA + one Django back-end). What is specific about SPA is that it's a static site that does not require a server to run.
Heroku does not care about that, making no distinction, and forcing you to pay for a static site the same amount that a "back-end app".
On the contrary, Render does care.
Oh thanks that's good news. I just read that: https://render.com/render-vs-heroku-comparison sound interesting.
May I ask you how do you compare with Heroku on 12 factors? Especially about environment managements. I particularly like how pipelines and promote work.
I really like the fact that the same build (named "slug") is used when promoting from staging to production.
(Render founder) SSH is already available in early access, and will enter general availability soon: https://render.com/docs/ssh. We've also added other big features like a managed Redis offering (also in early access with a wider launch in the next couple of months). What else would you like to see?
I'm new to the cloud, and I'm using Render's free tier to host small fullstack apps. With a VPS There just seems so much to do, setting up SSH certs, hardening the server, etc, it's so tempting to just go with a PaaS like Render, Google App Engine or AWS Elastic Beanstalk.
Is a VPS better? And do you have any advice how I could learn to set up a VPS for prod (as a beginner)? And when should I use Kubernetes?
Which limits ? From the free tier or pro one ? It's relative but the pro pricing is ok for what you get with Vercel which is basically no hassle to have NextJS in production, although I still don't get the logic behind the pricing per seat.
​
But yeah just the next 1TB of bandwith will cost you $550 ($0.55/GB) compared to $20 for the first one. For a kinda 1:1 alternative there is Netlify, apart of that there is :
https://www.serverless.com/plugins/serverless-nextjs-plugin that would make your app run on AWS, with some limitations though.
https://render.com/docs/deploy-nextjs-app which is an heroku like PAAS
Or just Dockerize and deploy to a VPS or a container as a service platform liker Google Cloud Run.
My production app (friendliest.app) is Ruby on Rails, Postgres and AWS S3 and CloudFront. The app's blog is Gatsby, React, GraphQL.
My new app in development (friendVOCATE) is also Rails and Postgres with AWS services, but leverages Hotwire/Turbo/StimulusJs in lieu of other JavaScript libraries. Knowledgeable for the new app is Jekyll.
Everything (Rails/Gatsby/Jekyll) is using Tailwind CSS and all of it is hosted on Render (https://render.com) and either runs through Render's CDN or AWS CloudFront.
If you haven't looked yet, StackShare is a cool resource for peeking at the stacks of SaaS platforms, big and small.
Here is the link to the full tech stack for my production app - https://stackshare.io/friendliest-app/friendliest-app
Cheers!
The ONE is heroku. It is the easiest and have been long enough for be considered almost the standard.
If you want to keep your servers while having friendly prices, there is also Hatchbox. Al lastly, lastly we can find heroku-like services (haven't tried) like render.com and fly.io
You could create your own Dockerfile for it and create a Private Service:https://render.com/docs/private-services
We discover and expose all ports for private services.
Render offers a redis 1-click that deploys through docker. - https://render.com/docs/deploy-redis
I didn't see a 1-click listed for memcached, but I see there is a 1-click component of their zulip deployment, so I imagine you could deploy it separately - https://render.com/docs/deploy-zulip
Cheers!
GitHub (and GitLab) integration is built in! Your service will auto-deploy on every push to GitHub. If you want to run tests on CircleCI before deploying, you can disable the auto-deploys and use a webhook to trigger the deploy after tests successfully pass.
(Render Dev Advocate here 👋)
I've done this myself before, you can simply create a slack webhook and a cronjob that runs every 12 hours, pulls the data, and posts to the webhook. If your job runs 1 minute every 12 hours, that's like $1 per month with https://render.com/pricing/#cronjobs
Render dev advocate here.
We just launched two free plans (web services and databases). Static sites are also free on Render.
Express deploy quickstart here if you want to give it a spin: https://render.com/docs/deploy-node-express-app
Pricing depends on whether this is a side project with little traffic or a full-fledged product by a team.
Some other cool and affordable options that can host your code and your Postgres DB:
Most hosting providers should support that, as long as they support generating SSL certificates for wildcard subdomains and you configure the DNS according to that. We do this for Convas on https://render.com/ (highly recommended) and previously used AWS as well.
It's up to your application code to read which subdomain you are on and show content based on that. Something like:
const subdomain = window.location.hostname;
const posts = fetch(/api/${subdomain}/posts
)
return (
...list of posts
)
I've seen a lot of demos of products and the demos always show pretty much the ideal case. Everything is perfect, users in the demo are filling out all fields correctly. Life is good.
In real life however those products are a mix of actually good to absolutely horrible, especially when things are not 100% aligned with what the product expects.
Just take a simple AWS Lambda function: Awesome, right!? Scales well, costs almost nothing. What could go wrong? No need for Ops! it just works! Deploy and done!
Except if you got 100 of them which call each other, and you got some race conditions because of their async nature, and functions calling functions calling functions...debugging is hard suddenly without good tracing which you never had to use before. And there's random latencies. And there was this function A calling function B calling function A...that was costly.
Who'll debug all this?
DevOps can automate the "happy path" and most of the "known-unhappy-path" scenarios, but the human mind is very creative to come up with new unexpected scenarios and technology has a history of failing in new ways too. Can't automate that away. You can outsource it, but that's an option which existed for a long time already. And it got mixed results too.
As for render.com in particular: as many similar products, as long as you follow their requirements and you work within their limits, all is well controlled and (possibly) flawlessly working. It gets far more interesting when you want something slightly differently. Not passing any judgement on their solution. I am not a potential customer here.
My app is currently hosted on Heroku - $7 dyno, $9 postgres.
I am taking a strong look at Render (https://render.com). Looking at how my app will grow, their pricing seems to scale more linearly instead of the steep pricing shelves with Heroku. I also like that even the least expensive DB tiers can isolated.
You could look at DigitalOcean's App Platform or Render for what I understand are Heroku-like platforms (I've used neither) but I expect the price would be similar.
I think at one point I worked out App Platform would be cheaper than Heroku if I had a few sites to manage, as they could each use separate databases on a single Managed Database Cluster. I think.
Anyway, worth a look; personally I'd pay a fair bit to avoid learning to use AWS or managing my own VPS but I know other people are very happy doing so!
That was my first idea. Unfortunately at https://render.com/ cron is not available out of the box and that's why I was looking for another solution. Thanks for pointing this out. I'll update the blog post with that information.
Thanks for reading!
I'd use DigitalOcean. You can self-host Hasura with a $5 / month droplet.
If you wanna go the Prisma route instead, you can pay for a managed DB but the lowest tier is $15 a month. I'd recommend just setting up Postgres on a $5 droplet again for development and you can go to managed DB for production.
If setting up a Postgres on a droplet feels complicated, Hostman has managed Postgres for $6 a month, and Render for $7 a month but with way less RAM and storage than Hostman.
A hidden gem is Render. It's like Heroku but cheaper, more intuitive and they have automatic deployment, databases and exquisite customer service speed! Also domain dns pointing is a piece of cake. It might be something like this you had in mind?
Perhaps something like VueStorefront might work for you.
You could host it for free as a static site on Render or Vercel
You can use netlify.com or vercel.com for hosting React site. Its free.
For the backend (and frontend) you may use render.com. They are super cheap.
This was more than a year ago, so things might be different now. I had a GraphQL servers in Rocket.
I tried using AWS lambdas, this worked well, but I hated how I couldn't run my server locally (so I can develop my front end at the same time). I don't think this has been solved for Rust yet.
Tried a bunch of Docker hosting services. I can't remember the exact issues, but everything was more complicated than necessary, so I didn't follow the Docker path.
Also tried Heroku, I had issues with the build timeout there. Cargo uses Heroku, but they must be paying for a very fast instance. With the cheap instance I couldn't get my project to compile. Tried just pushing a binary but that didn't work well either.
At the end tried Render (https://render.com/). That was a success and fairly easy to do deployments. So they are my favorite at the moment.
I found links in your comment that were not hyperlinked:
I did the honors for you.
^delete ^| ^information ^| ^<3
I know I'm late, but I fucking love render.com.
I deployed my site in less than 15 minutes, and whilst I needed to do about 2 hours of fixing errors on my end, I am sure I could deploy in less than 5 minutes with another site
I found links in your comment that were not hyperlinked:
I did the honors for you.
^delete ^| ^information ^| ^<3
Thanks for the suggestions, I see your point of view on what to use, however, as I said in the post, I'm trying to get better in elixir and, it is much simpler than anything with JS, I remember that even when I had a decent knowledge of this stack, I would spends hours fixing errors, dealing with deprecated deps etc., but, I will check out render.com more
If you want something that is not difficult to setup and is cost effective have a look at render.com. Its an awesome service, I am/was new to web dev as well an still I delployed my fairly complex website with a postgres db and filehosting on S3 within 1 hour.
If you're looking for somewhere to send logs I learned Elixir and built Logflare. We have a logger backend so your logs will just show up in Logflare if you use our library. Would love some more Elixir devs on board!
I very much like render.com for getting something online quick with Elixir. They have great up to date Elixir guides which gets you setup for container deploys anyways.
All in all I've found it pretty straight forward. You'll definitely want OTP practice. Phoenix Live View is actually kind of a good intro to it as all your views/components are just processes. Definitely setup the Phoenix Live Dashboard.
If you're on Heroku vs something like DigitalOcean for ease of setup I'd definitely recommend Render. The pricing is a bit better from my experience. It's not as feature packed but it's incredibly easy to set up.
Awesome stack and awesome work. I'd recommend this host over netlify so you don't get hit with hidden build time charges like foolish me.
I'd love to see the code! I'm working on a similar project for a client (contentful + Gatsby + Paypal).
No, it is for static websites only. You could spin up your backend on digital ocean or heroku or something. Or you could check out Render if you want to be more tightly coupled. Otherwise, if you want them to be on the same server you'll have to go a different route (make your own node/express/react server setup).
Can they not run rails locally?
You could enable pull request previews on Render: https://render.com/docs/pull-request-previews
Or you could enable Review Apps on heroku, then their pull requests will be auto deployed to staging.