From 7a1876e3f0256c8328d451385e617233967773ad Mon Sep 17 00:00:00 2001 From: kev Date: Wed, 13 Mar 2019 13:38:16 +0800 Subject: [PATCH] update node-red --- node-red/Dockerfile | 6 +++--- node-red/README.md | 6 +++--- node-red/arm/Dockerfile | 6 +++--- node-red/arm/docker-compose.yml | 2 +- node-red/docker-compose.yml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/node-red/Dockerfile b/node-red/Dockerfile index fede821..bf6f587 100644 --- a/node-red/Dockerfile +++ b/node-red/Dockerfile @@ -24,9 +24,9 @@ RUN set -xe \ python3-dev \ && rm -rf /tmp/npm-* -WORKDIR /root/.node-red -VOLUME /root/.node-red +WORKDIR /data +VOLUME /data EXPOSE 1880 -CMD ["node-red"] +CMD ["node-red", "--userDir", "/data"] diff --git a/node-red/README.md b/node-red/README.md index d8724df..18cd049 100644 --- a/node-red/README.md +++ b/node-red/README.md @@ -13,7 +13,7 @@ services in new and interesting ways. ``` ~/fig/node-red/ ├── docker-compose.yml -└── node-red/ +└── data/ ├── flows_cred.json ├── flows.json ├── lib/ @@ -31,7 +31,7 @@ node-red: ports: - "1880:1880" volumes: - - ./data:/root/.node-red + - ./data:/data restart: always ``` @@ -73,7 +73,7 @@ $ docker-compose up -d $ docker-compose exec node-red node-red-admin hash-pw $ vi data/settings.js $ docker-compose exec node-red bash ->>> cd /root/.node-red +>>> cd /data >>> apk add -U build-base >>> npm install node-red-node-irc >>> npm install node-red-node-daemon diff --git a/node-red/arm/Dockerfile b/node-red/arm/Dockerfile index 1cc53b8..81d094c 100644 --- a/node-red/arm/Dockerfile +++ b/node-red/arm/Dockerfile @@ -24,9 +24,9 @@ RUN set -xe \ python3-dev \ && rm -rf /tmp/npm-* -WORKDIR /root/.node-red -VOLUME /root/.node-red +WORKDIR /data +VOLUME /data EXPOSE 1880 -CMD ["node-red"] +CMD ["node-red", "--userDir", "/data"] diff --git a/node-red/arm/docker-compose.yml b/node-red/arm/docker-compose.yml index e787c1d..da94bd8 100644 --- a/node-red/arm/docker-compose.yml +++ b/node-red/arm/docker-compose.yml @@ -3,7 +3,7 @@ node-red: ports: - "1880:1880" volumes: - - ./data:/root/.node-red + - ./data:/data - /dev/input:/dev/input privileged: yes restart: always diff --git a/node-red/docker-compose.yml b/node-red/docker-compose.yml index 2ba655f..a29ffc4 100644 --- a/node-red/docker-compose.yml +++ b/node-red/docker-compose.yml @@ -3,7 +3,7 @@ node-red: ports: - "1880:1880" volumes: - - ./data:/root/.node-red + - ./data:/data - /dev/input:/dev/input privileged: yes restart: always