wip
Some checks failed
Build and push nixos-based docker container / build (push) Failing after 4s

This commit is contained in:
James Andariese 2024-08-04 01:47:08 -05:00
parent 27588a1d35
commit c08a492eb6

View File

@ -2,19 +2,34 @@
let
name = "node-red";
packages =
with pkgs;
with nodePackages;
[
bash
coreutils
nodejs
npm
node-red
#ungoogled-chromium
];
entrypoint = pkgs.writeShellApplication {
name = "entrypoint";
runtimeInputs = with pkgs; with nodePackages; [
node-red
#ungoogled-chromium
];
runtimeInputs = packages;
text = ''
npm i passport-openidconnect
node-red -u "''${DATA-/data}" -s "''${SETTINGS-/data/settings.js}"
'';
};
in pkgs.dockerTools.streamLayeredImage {
inherit name;
contents = packages;
config.Cmd = [ "${entrypoint}/bin/entrypoint" ];
config.Workdir = "/data";
extraCommands = ''
mkdir -p /data
chown 1000:1000 /data
'';
}