FROM nodered/node-red

# 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 /appdata/settings.js /data/settings.js
COPY /appdata/flows_cred.json /data/flows_cred.json
COPY /appdata/flows.json /data/flows.json

# Bind Volumes for Testing
# VOLUME ./appdata:/data

# Expose the Port Outside the container to the localhost
EXPOSE 1880

# Install Additional Packages
RUN npm install --unsafe-perm --no-update-notifier --no-fund --only=production
RUN npm install node-red-contrib-eaton-easye4 node-red-node-sqlite