Revert "Set up CGM repository"
This commit is contained in:
@@ -38,38 +38,10 @@
|
||||
ports = [ "127.0.0.1:9641:9641" ];
|
||||
volumes = [ "/vault/mqtt2prometheus/config.yaml:/config.yaml" ];
|
||||
};
|
||||
# CGM repository
|
||||
nightscout = {
|
||||
image =
|
||||
"nightscout/cgm-remote-monitor@sha256:ce522a9fe9b1373f576329e48349a622c8a9b6177c93dc2771152df36dd90876";
|
||||
environmentFiles = [ config.age.secrets.nightscout.path ];
|
||||
extraOptions = [ "--pod=cgm-repo" ];
|
||||
dependsOn = [ "mongodb" ];
|
||||
};
|
||||
# CGM repository database
|
||||
mongodb = {
|
||||
image =
|
||||
"mongo:4.4.9@sha256:0837a92d01bcc8c750a8d692ed4df33f0befd07ef261b23e7d9feda04bacd3eb";
|
||||
volumes = [ "/vault/mongodb:/data/db" ];
|
||||
extraOptions = [ "--pod=cgm-repo" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Allow networking between Cgm-Repo and MongoDB
|
||||
systemd.services.create-cgm-repo-pod = {
|
||||
serviceConfig.Type = "oneshot";
|
||||
wantedBy = [ "podman-mongodb.service" ];
|
||||
script = with pkgs; ''
|
||||
${podman}/bin/podman pod exists cgm-repo || ${podman}/bin/podman pod create -n cgm-repo -p '127.0.0.1:1337:1337'
|
||||
'';
|
||||
};
|
||||
|
||||
# Start services after ZFS mount
|
||||
systemd.services.podman-mongodb.unitConfig.RequiresMountsFor =
|
||||
[ /vault/mongodb ];
|
||||
systemd.services.podman-mqtt2prometheus.unitConfig.RequiresMountsFor =
|
||||
[ /vault/mqtt2prometheus ];
|
||||
systemd.services.podman-mqtt2prometheus.unitConfig.RequiresMountsFor = [ /vault/mqtt2prometheus ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user