-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: noDB flag #12
Comments
i'm a bit confused, do you request support for https://github.com/Miserlou/NoDB?
|
No, the suggestion I'm making is that currently every instance of a webservice adds a .service for a database component - even if there is not a database required. That pollutes the service overview, and produces cruft. For instance for leaps there is no database required... So a way to indicate somewhere, somehow that the webservice does not use a database nor ever will. (Perhaps similar to how you can indicate which phases you want to run in nixpkgs - which speeds things up) |
sounds like something we should do |
@leenaars: I'm not quite sure what you mean exactly, because the actual database service is only enabled whenever there are databases defined. The only unit that's really always there is $ nix-store -qR $(nix-instantiate tests -A webservices.leaps) | grep database
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/g07divd6myf8w90z34mdkqchczm82snp-unit-leaps-bar-database.target.drv
/nix/store/xrvdcv4dfjm4w4lyryj8r6gnb71ym25k-unit-leaps-foo-database.target.drv
$ |
Lots of empty targets clutter the user understanding (these are still listed with the 'real' targets and services when the end user looks at it). There are cases where I would expect many identical instances to live alongside each other, with databases categorically not needed (like when hosting tens of different tiny static sites or web apps). Having an optional flag to turn these 'boilerplate services' off generically in the service definition seems an easy win to reduce clutter. |
Having unnecessary target units for every container is distracting for users, so let's actually make sure that these targets only exist whenever there are databases assigned. Signed-off-by: aszlig <aszlig@nix.build> Issue: #12
Even better. Thanks! |
It doesn't make sense (especially on systems with scarce resources) to have many instances of similar services looking after databases that will never not exist. My test setup has a limited amount of inodes, which is eaten up by a very large nix store. That situation is likely to be quite common in cheap hosting. Database software is big (>3000 inodes for postgresql in the nix store) so this helps ...
The text was updated successfully, but these errors were encountered: