MongoDB: Difference between revisions

Tboston (talk | contribs)
Initial mongodb article
 
Notarin (talk | contribs)
m Ammended initialRootPassword -> initialRootPasswordFile
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[wikipedia:MongoDB|MondoDB]] is a NoSQL database program.  
[[wikipedia:MongoDB|MongoDB]] is a NoSQL database program.  


== Installation ==
== Installation ==
Line 7: Line 7:
...
...
</syntaxhighlight>
</syntaxhighlight>
{{warning|The default <code>mongodb</code> package does not provide pre-compiled binaries, and the package will be compiled locally. The alternate package <code>mongodb-ce</code> does however. You can configure the mongodb service to use this package with the following:<syntaxhighlight lang="nix">services.mongodb.package = pkgs.mongodb-ce;</syntaxhighlight>}}


== Configuration ==
== Configuration ==
Here's an example with multiple options. Beware that putting your password in <syntaxhighlight lang="nix">
Here's an example with multiple options. Beware that putting your password in cleartext into the config should not be done. Please check [[Comparison of secret managing schemes]] for that matter. <syntaxhighlight lang="nix">
services.mongodb = {
services.mongodb = {
   enable = true;
   enable = true;
   package = "mongodb-5_0";
   package = "mongodb-5_0";
   enableAuth = true;
   enableAuth = true;
   initialRootPassword = "YourSecurePassword";
   initialRootPasswordFile = /path/to/secure/passwordFile;
   bind_ip = "10.5.0.2";
   bind_ip = "10.5.0.2";
};
};
</syntaxhighlight>
</syntaxhighlight>
[[Category:Server]]
[[Category:Database]]