arion/examples/minimal/arion-compose.nix
2020-10-10 22:09:35 +02:00

19 lines
473 B
Nix

{ pkgs, ... }:
{
config.name = "webapp";
config.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";
service.stop_signal = "SIGINT";
};
};
}