3 ms·
> I’m not smart enough to figure out docker confiuration, so instead I compile my web application into a self contained statically linked binary executable file
by ianpurton 3y ago
> I’m not smart enough to figure out docker confiuration, so instead I compile my web application into a self contained statically linked binary executable file.
Good luck getting that to run in different environments because static or not, nearly every executable has dependencies.
> I’m not smart enough to figure out cloud services and auto scaling groups, so I just upload my static binary file using scp to a linux server I rent from a VPS provider.
Which of course you'll need to setup, patch, figure out how to restart apps when they go down and on and on. There's no easy out.
> I’m not smart enough to figure out how to setup all the databases and firewalls and load balancers, so I just embed the http server and data storage engine as libraries in my static binary.
And how do you back that up?
I get the gist of the article, but some things are not always replaceable with an easy alternative. Most alternatives also have disadvantages as well as their own learning curves.
Postgres, Docker, Infra as Code and Kubernetes are pretty much best practices on any development.
Don't kid yourself that the learning curve is not worth it.
- actionfromafar 3y agoI’ll take a static binary any day over some virtual image, thanks.
- ianpurton 3y agoDocker images run native on Linux. The virtual part is just to get Docker working on MacOs/Windows
- __MatrixMan__ 3y ago> Good luck getting that to run in different environments because static or not, nearly every executable has dependencies. Maybe he's using nix to parameterize his builds with the system architecture, but left it out because it didn't fit his idea for a blog post.
- hsn915 3y agoNo. I'm too stupid to even understand what that means.
- deleted 3y ago[deleted]
- vlowther 3y ago> Good luck getting that to run in different environments because static or not, nearly every executable has dependencies. Go compiled with CGO_ENABLED=0 disagrees, especially since embedding was folded into the standard library. > Which of course you'll need to setup, patch, figure out how to restart apps when they go down and on and on. There's no easy out. Recompile, upload, restart. If the VPS server goes down, that is what their tech support is for. > And how do you back that up? Either use LVM snapshots and tar or sigstop/tar/sigcont, and rely on whatever embedded storage engine you are using to be able to recover from what will appear to be a bog standard recovery from unexpected shutdown. If you are nice, arrange for an API to be able to take a complete snapshot of your running data. > Postgres, Docker, Infra as Code and Kubernetes are pretty much best practices on any development. That is debatable. There is a whole lot to be said about the virtues of a single binary that has no dependencies beyond a vaguely modern Linux distro.