Coder Social home page Coder Social logo

Comments (7)

qknight avatar qknight commented on June 23, 2024

i'm a bit confused, do you request support for https://github.com/Miserlou/NoDB?

My test setup has a limited amount of inodes, which is eaten up by a very large nix store.
having multiple databases, one per webservice, helps in separation of concerns and mainly requires more RAM and not so much more inodes.

from nixcloud-webservices.

leenaars avatar leenaars commented on June 23, 2024

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)

from nixcloud-webservices.

qknight avatar qknight commented on June 23, 2024

sounds like something we should do

from nixcloud-webservices.

aszlig avatar aszlig commented on June 23, 2024

@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 database.target, which is used for ordering instance startup:

$ 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
$

from nixcloud-webservices.

leenaars avatar leenaars commented on June 23, 2024

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.

from nixcloud-webservices.

aszlig avatar aszlig commented on June 23, 2024

@leenaars: I think using such a flag for something that we can figure out automatically would add even more confusion, so now (ce59aed) the targets are no longer there if no databases are assigned.

Does that address your issue?

from nixcloud-webservices.

leenaars avatar leenaars commented on June 23, 2024

Even better. Thanks!

from nixcloud-webservices.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.