diff --git a/doc/mongodb.md b/doc/mongodb.md index 0f286b76..339cb65b 100644 --- a/doc/mongodb.md +++ b/doc/mongodb.md @@ -6,6 +6,22 @@ Because of the licensing of MongoDB, the Nixpkgs derivation that provides the bi If you are using this for your own development, you should either put in place a [local binary cache](https://nixos.wiki/wiki/Binary_Cache) to match your flake, or be aware that the first time you spin up the service it could possibly take a long time to build. +## Pre-built binaries + +[mongodb-ce](https://github.com/NixOS/nixpkgs/blob/e58a261efb95afd52fb4a1cf35185a017327a96d/pkgs/by-name/mo/mongodb-ce/package.nix) package from [nixpkgs](https://github.com/NixOS/nixpkgs) fetches pre-built binaries[^why-pre-built]. You can also build the binary from scratch using [mongodb](https://github.com/NixOS/nixpkgs/blob/924e8aa12419c6ac57690ed47c1d9af580c818a2/pkgs/servers/nosql/mongodb/mongodb.nix) package: + +```nix +# Inside `process-compose.` +{ + services.mongodb."m1" = { + enable = true; + package = pkgs.mongodb; + }; +} +``` + +[why-pre-built]: For more context on why pre-built binary is used, see: https://github.com/juspay/services-flake/pull/360 + ## Usage example