feat: monitoring + containers - grafana + prometheus + node_exporter + other exporters

This commit is contained in:
Ryan Yin
2024-02-17 19:53:20 +08:00
parent 9626986524
commit b6e51e1950
25 changed files with 739 additions and 184 deletions
@@ -0,0 +1,24 @@
{
# Install the dashy configuration file instaed of symlink it
system.activationScripts.installDashyConfig = ''
install -Dm 600 ${./dashy_conf.yml} /etc/dashy/dashy_conf.yml
'';
# https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/virtualisation/oci-containers.nix
virtualisation.oci-containers.containers = {
# check its logs via `journalctl -u podman-dashy`
dashy = {
hostname = "dashy";
image = "lissy93/dashy:latest";
ports = ["4000:80"];
environment = {
"NODE_ENV" = "production";
};
volumes = [
"/etc/dashy/dashy_conf.yml:/app/public/conf.yml"
];
autoStart = true;
# cmd = [];
};
};
}