arion/examples/flake/arion-compose.nix

21 lines
525 B
Nix
Raw Normal View History

2021-04-20 10:31:09 +02:00
{ pkgs, ... }:
{
config.project.name = "webapp";
config.services = {
webserver = {
2021-10-17 21:35:14 +02:00
image.contents = with pkgs; [ bash ];
2021-04-20 10:31:09 +02:00
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";
};
};
}