From 83bbfe8ae77a363d373b0fec2c18ac8e0ecd3a0c Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Wed, 18 Dec 2024 13:28:34 +0000 Subject: [PATCH] Add node-red editor cache files --- flowforge-docker/Dockerfile | 4 ++++ flowforge-docker/install-device-cache.sh | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 flowforge-docker/install-device-cache.sh diff --git a/flowforge-docker/Dockerfile b/flowforge-docker/Dockerfile index 13d07a5..15232da 100644 --- a/flowforge-docker/Dockerfile +++ b/flowforge-docker/Dockerfile @@ -9,6 +9,10 @@ RUN apk add --no-cache --virtual build-base g++ make py3-pip sqlite-dev python3 WORKDIR /usr/src/forge RUN mkdir app bin etc var +WORKDIR /usr/src/forge/var +COPY install-device-cache.sh . +RUN ./install-device-cache.sh && rm install-device-cache.sh +WORKDIR /usr/src/forge COPY package.json /usr/src/forge/app WORKDIR /usr/src/forge/app RUN npm install --production --no-audit --no-fund diff --git a/flowforge-docker/install-device-cache.sh b/flowforge-docker/install-device-cache.sh new file mode 100755 index 0000000..396815f --- /dev/null +++ b/flowforge-docker/install-device-cache.sh @@ -0,0 +1,20 @@ +#!/bin/sh -x + +VERSION_LIST="4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.7" + +mkdir -p device/cache +cd device/cache + +pwd + +for V in $VERSION_LIST +do + echo $V + mkdir $V + ls -l + npm install --omit=dev --omit=optional --no-audit --no-fund --prefix "$V" "@node-red/editor-client@$V" +done + +pwd +ls -l +du -sh \ No newline at end of file