Closed shivaraj-bh closed 7 months ago
2. Instead of running empty pg1 and r1, what if we had something equally demo-worthy as example/simple (which shows pgweb)?
Perhaps we can just clone example/simple
and refactor it. Viz., put the northwind db service in example/share-services/database/flake.nix
:
And then use it, for running pgweb, from example/share-services/frontend/flake.nix
:
? That's one idea.
Interestingly, in future we can create another example to demonstrate creation of new services, by refactoring this pgweb into its own service (services.pgweb.pgservice = config.services.postgres.pg1
).
@srid I have so far implemented this. Although, I am not super pleased with the way services.nix is being used between databases
and frontend
, any suggestions?
any suggestions?
I'll take a look. I just added a justfile
command to run the new example, and I noticed this despite the sockerDir
option:
Bug somewhere?
Its not a bug, data will still remain in pwd, only the socket will be created elsewhere. Hence, the options, dataDir
and socketDir
are different.
Also, if we move the northwind
DB to share-services
example, would it make sense to have a much simpler example in simple
?
Also, if we move the
northwind
DB toshare-services
example, would it make sense to have a much simpler example insimple
?
Simple, as in ?
@shivaraj-bh These files seem out of place; were they added by accident?
n/m - that's just old code in the PR.
Also, if we move the
northwind
DB toshare-services
example, would it make sense to have a much simpler example insimple
?Simple, as in ?
n/m, I was thinking of just having
services.postgres.pg.enable = true;
services.redis.r1.enable = true;
But such simple cases are anyways covered in the "Getting started" section of the service documentation.
Good enough, we can always improve our examples later, and add more of them. I'll merge, and flip the branch name in main
.
Run services:
Run integration-test: