Hacker News new | ask | show | jobs
by manigandham 2038 days ago
I recommend just writing a Docker container instead. That's the ultimately portability and you can run in much more efficient environments (Cloud Run, Fargate, DigitalOcean Apps, Fly.io) and still scale up to large Kubernetes-based clusters if/when you need it.

Docker containers avoid the lock-in of a particular platform or CLI, and they can also be used as cheap CI/CD with multi-stage builds within the container.

3 comments

Docker means you're maintaining an operating system, watching out for security vulnerabilities, patching software. It's still work, and if you screw it up, you're hosed.

If you're on Heroku or Google App Engine, you deploy your application code. That's it.

Docker containers (on Linux) don't have a guest OS. They all share the same kernel and only the userland is different depending on which distro you choose for your base.

You can choose to build on a scratch/blank image just as easily, which means nothing except your app itself is in the image.

You still have to update the packages or distro your image is based on. It’s not as maintenance free as heroku or google app engine.
Sure, but you can get the latest image automatically as part of your container build. It's not as hard as it seems.

Or you can build an image from scratch without any distro and then there's nothing to maintain.

You can deploy Docker containers to Heroku. I've done this (just requires a simple heroku.yml file and heroku stack:set container). If the project grows to the size where Heroku's costs become prohibitive, I can easily switch over to Digital Ocean with some tweaks to the docker config.
Why not just save the money and start elsewhere?
Most of my side projects never go beyond needing heroku free tier, and if they gain some traction the basic tier is usually sufficient.
And also Heroku. I'm not disagreeing, just saying Heroku becomes 'just another platform', and if it still looks expensive, you can go elsewhere, if it's cheaper/better in some way (I have no idea nor horses) then go with it.