Some folks on the internet were interested in how I had managed to ditch Docker for local development. This is a slightly overdue write up on how I typically do things now with Nix, Overmind and Just.

2 points

fleek anybody?, https://getfleek.dev/

permalink
report
reply
1 point

and if you want setup per project, try: https://devenv.sh/, both are nix based

permalink
report
parent
reply
3 points

I’m surprised no one has mentioned either of the following solutions as alternatives to this explanation (and docker) that still uses Nix:

permalink
report
reply
8 points

Kind of cool if your production infrastructure can match. But for most companies (ie, Fortune 500 and some medium companies) implementing this would need a force majeure.

Decades of software rot, change in management, change in architecture, waxing and waning of software and hardware trends, half assed implementations, and good ole bottom tier software consultation/contractors brought into the mix make such things impossible to implement at scale.

Once worked at a company where their onprem infra was a mix of mainframe, ibm / dell proprietary crap, Oracle vendor locked, and some rhel/centos servers. Of course some servers were on different versions of the OS. So it was impossible to setup a development environment to replicate issues.

For the most part, that’s why I still use docker for most jobs. Much easier to pull in the right image, configure app deployment declaratively, and reproduce the bug(s). I would say 90% of the time it was reproducible. Before docker/containerization it was much less than that and we had to reproduce in some non production environment that was shared amongst team.

permalink
report
reply
3 points

Related, this article talks about combining nix and direnv: https://determinate.systems/posts/nix-direnv

Using these tools you are able to load a reproducible environment (defined in a nix flake) by simply cding into a directory.

permalink
report
reply
8 points
*

I use a similar approach, but I went further by creating a system that compose like docker-compose would. The trick was to write my own nix function mergeShells.

https://her.esy.fun/posts/0024-replace-docker-compose-with-nix-shell/index.html

For now, I am pretty happy with it. Also, I put the init script inside nix-shell and not in external files and use exit signal to cleanup the state.

permalink
report
reply
2 points

Thanks for sharing this! Added to my weekend inspiration/reading pile. 🙏

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.6K

    Monthly active users

  • 1.8K

    Posts

  • 29K

    Comments