Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Node-RED client for device editor cache #521

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions flowforge-container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:18-alpine

ARG REGISTRY
ARG REGISTRY_TOKEN

Check warning on line 4 in flowforge-container/Dockerfile

View workflow job for this annotation

GitHub Actions / Build single-architecture container images / build

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "REGISTRY_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ARG TAG
RUN if [[ ! -z "$REGISTRY_TOKEN" ]]; then echo "//$REGISTRY/:_authToken=$REGISTRY_TOKEN" >> ~/.npmrc ; fi
RUN if [[ ! -z "$REGISTRY" ]] ; then npm config set @flowfuse:registry "https://$REGISTRY"; fi
Expand All @@ -11,6 +11,10 @@

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 if [[ -z "$TAG" ]]; then npm install --production --no-audit --no-fund ; else npm install --production --no-audit --no-fund --tag $TAG; fi
Expand Down
20 changes: 20 additions & 0 deletions flowforge-container/install-device-cache.sh
Original file line number Diff line number Diff line change
@@ -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
Loading