by larrymyers · 4y ago · 0 comments
The whole point is that if you're going to take advantage of a free tier you should do so in a way that switching is trivial. Docker goes a long way to achieving that.
I personally just pay $10/month to Linode and self host these days using Nomad. Less restrictions and more freedom for the cost of a coffee and a bagel.
Adding docker means adding a whole new layer to ALL of my projects, which I'd prefer to avoid specially when there's no need as Heroku has very clearly shown.
How do your dependencies get installed? What happens if you depend on something in your package.json that isn't on the public npm repo? What happens if you need to compile some native code as part of one of your dependencies?
Do you need to depend on anything provided by the OS? Timezone data? Maybe you use sqlite as a storage backend and want to ship your database file as well. How do you include configuration data?
Docker drastically simplifies packaging and deployment, and gives you a ton of flexibility in where and how you run your code.
Oracle a problem? No, because my Jails can wander to Vultr, Hetzner (yes they sill support FreeBSD) and Amazon andandand, the only change is a DNS one.
Regardless, as someone who uses a variety of languages and is in the exact same situation, my generic Makefile is probably easier to read and understand than any standard that you have probably achieved.
> my generic Makefile is probably easier to read and understand than any standard that you have probably achieved
That sounds fairly rude for HN
If you have the need to state this when it's not relevant, then I highly doubt you have readable Makefiles ;)
Or do you mean it's the same in Fly.io? If it auto-detects Node.js (through package.json), or at most allows for a dropdown to say "Node.js project", then that sounds about right for me.
Indeed the docs[1] say Fly automatically detects a Node.js project, so you don't need to create a Dockerfile.
[1]: https://fly.io/docs/languages-and-frameworks/node/#launch-th...
Overall, I'm inclined to agree! You can pick a stack that's as boring or interesting as you want and have your container images work in almost any environment where OCI is supported, with minimal tweaking.
You can use either base images that someone else has made (Bitnami images in particular are rather nice), or build your own, about which I wrote in more detail: https://blog.kronis.dev/articles/using-ubuntu-as-the-base-fo...
Currently each of my individual nodes cost around 5-10 euros a month, or I can even use my homelab servers for whatever I want, since they can either be in the same cluster or a separate cluster. Essentially you just adjust some deployment constraints and feed some YAML/HCL into whatever container orchestrator you have. Provided that your registry access is configured correctly, you'll have your software up and running in minutes.
Did not mean to imply that Dockerizing applications is a bad thing - actually even pointed out that "it's not so hard". Just wanted to point out that writing one takes some effort and therefore Fly.io is not a drop-in replacement for Heroku.
Container based deployment is a great thing to have and definitely a skill worth learning.
Wish more cloud providers would focus on helping with existing open source tech, rather than trying to suck you in.
And it's a nightmare compared to fly.io
I’ve deployed K8s in the past but was curious if Nomad is lighter/easier