1.4 KiB
title | date | permalink | tags | cta | snippet | |||||
---|---|---|---|---|---|---|---|---|---|---|
Could Nix and devenv replace Docker Compose? | 2024-11-11 | daily/2024/11/11/could-nix-and-devenv-replace-docker-compose |
|
~ | Could Nix and devenv replace Docker and Docker Compose for me in my Drupal projects? |
I started using the Nix package manager in September 2022 as a replacement for Ansible to manage my dotfiles.
Since then, I've switched to daily-driving NixOS as my main operating system and started to use Nix instead of Docker for some development projects.
Even though I'm running Linux, there's a benefit to not running containers for simple projects as well as the reproducibility that Nix provides.
I hadn't invested much time in using Nix as Docker replacement for Drupal projects, but this week, I've started to look at devenv - a development tool based on Nix.
As well as declaring and locking the package versions I need for each project, it also manages the services I need, such as PHP-FPM and MariaDB or MySQL.
It also configures Git hooks, test scripts and custom processes, such as running Tailwind CSS.
I've configured it for a few projects this week and it could be a potential Docker replacement for me.
If you want to see an example, see this repo on GitHub.