generated from Randers-Kommune-Digitalisering/node-red-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (29 loc) · 1.19 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM nodered/node-red
# Copy package.json to the WORKDIR so npm builds all
# of your added nodes modules for Node-RED
COPY node-red/package.json .
RUN npm install --unsafe-perm --no-update-notifier --no-fund --only=production
# Copy _your_ Node-RED project files into place
# NOTE: This will only work if you DO NOT later mount /data as an external volume.
# If you need to use an external volume for persistence then
# copy your settings and flows files to that volume instead.
COPY node-red/settings.js /data/settings.js
COPY node-red/flows_cred.json /data/flows_cred.json
# COPY flows.json /data/flows.json
# COPY complete flow directory generated by the storage plugin:
# https://flows.nodered.org/node/node-red-contrib-js-storage
COPY ./node-red/flows_js /data/flows_js
USER root
# Copy project files and folders to the current working directory
COPY vue /app
# Install project dependencies
RUN cd /app && npm install
# Build app for production with minification
RUN cd /app && npm run build
# install project dependencies
RUN cd /app/express && npm install
# Build express server
RUN cd /app/express && npm ci --only=production
USER node-red
# Copy entrypoint script
COPY entrypoint.sh .