-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (22 loc) · 806 Bytes
/
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
# Use the official node image
FROM node:20.10.0-alpine as build
# Set the working directory
WORKDIR /app
# Copy the package.json file
COPY web_app/package.json .
# Install the dependencies
RUN npm install
# Copy the rest of the files
COPY web_app/ .
# Replace settings.js with the one in the repository
RUN cp /app/settings.js /app/node_modules/node-red/settings.js
# Make root directory for node-red
RUN mkdir /root/.node-red
# Copy certificate file, credentials file, and runtime configuration file to the root node-red directory
RUN cp /app/isrgrootx1.pem /root/.node-red/isrgrootx1.pem
RUN cp /app/flows_cred.json /root/.node-red/flows_cred.json
RUN cp /app/.config.runtime.json /root/.node-red/.config.runtime.json
# Expose port 1880
EXPOSE 1880
# Start the application
CMD ["npm", "start"]