Skip to content

Commit

Permalink
docs(mongodb): pre-built binaries from mongodb-ce
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaraj-bh committed Oct 13, 2024
1 parent fba8ad1 commit 1769fda
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<name>`
{
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

<https://github.com/juspay/services-flake/blob/main/nix/services/mongodb_test.nix>

0 comments on commit 1769fda

Please sign in to comment.