Compare commits
2 commits
main
...
for-nixpkg
Author | SHA1 | Date | |
---|---|---|---|
|
bafed69246 | ||
|
4b6302a613 |
2 changed files with 18 additions and 11 deletions
|
@ -2,16 +2,11 @@
|
|||
{
|
||||
config.docker-compose.services = {
|
||||
|
||||
webserver = {
|
||||
service.useHostStore = true;
|
||||
service.command = [ "sh" "-c" ''
|
||||
cd "$$WEB_ROOT"
|
||||
${pkgs.python3}/bin/python -m http.server
|
||||
'' ];
|
||||
service.ports = [
|
||||
"8000:8000" # host:container
|
||||
];
|
||||
service.environment.WEB_ROOT = "${pkgs.nix.doc}/share/doc/nix/manual";
|
||||
};
|
||||
webserver.imports = [ ./service-webserver.nix ];
|
||||
|
||||
# webserver = {...}: {
|
||||
# imports = [ ./service-webserver.nix ];
|
||||
#};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
12
examples/minimal/service-webserver.nix
Normal file
12
examples/minimal/service-webserver.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }: {
|
||||
service.useHostStore = true;
|
||||
service.command = [ "sh" "-c"
|
||||
''
|
||||
cd "$$WEB_ROOT"
|
||||
${pkgs.python3}/bin/python -m http.server
|
||||
'' ];
|
||||
service.ports = [
|
||||
"8000:8000" # host:container
|
||||
];
|
||||
service.environment.WEB_ROOT = "${pkgs.nix.doc}/share/doc/nix/manual";
|
||||
}
|
Loading…
Reference in a new issue