Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e08bd37
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#FROM nodered/node-red-docker | ||
#COPY settings.js /usr/src/node-red/node_modules/node-red/ | ||
#RUN ln -s /home /data | ||
#ENV PORT=80 | ||
#EXPOSE 80 | ||
FROM node:6 | ||
|
||
# Home directory for Node-RED application source code. | ||
RUN mkdir -p /usr/src/node-red | ||
|
||
# User data directory, contains flows, config and nodes. | ||
RUN mkdir -p /home/data | ||
|
||
WORKDIR /usr/src/node-red | ||
|
||
# Add node-red user so we aren't running as root. | ||
RUN useradd --home-dir /usr/src/node-red --no-create-home node-red \ | ||
## && chown -R node-red:node-red /home/data \ | ||
&& chown -R node-red:node-red /usr/src/node-red | ||
|
||
USER node-red | ||
|
||
# package.json contains Node-RED NPM module and node dependencies | ||
COPY package.json /usr/src/node-red/ | ||
RUN npm install | ||
|
||
# User configuration directory volume | ||
EXPOSE 1880 | ||
|
||
# Environment variable holding file path for flows configuration | ||
ENV FLOWS=flows.json | ||
ENV NODE_PATH=/usr/src/node-red/node_modules:/home/data/node_modules | ||
|
||
CMD ["npm", "start", "--", "--userDir", "/home/data"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "node-red-docker", | ||
"version": "1.0.0", | ||
"description": "A visual tool for wiring the Internet of Things", | ||
"homepage": "http://nodered.org", | ||
"license": "Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/node-red/node-red-docker.git" | ||
}, | ||
"main": "node_modules/node-red/red/red.js", | ||
"scripts": { | ||
"start": "node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Dave Conway-Jones" | ||
}, | ||
{ | ||
"name": "Nick O'Leary" | ||
}, | ||
{ | ||
"name": "James Thomas" | ||
} | ||
], | ||
"dependencies": { | ||
"node-red": "0.17.5", | ||
"node-red-node-msgpack": "*", | ||
"node-red-node-base64": "*", | ||
"node-red-node-suncalc": "*", | ||
"node-red-node-random": "*" | ||
}, | ||
"engines": { | ||
"node": "4.*.*" | ||
} | ||
} |