3 ms·
> Good luck getting that to run in different environments because static or not, nearly every executable has dependencies. Go compiled with CGO_ENABLED=0 disag
by 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.