UNPKG

1.46 kBPlain TextView Raw
1# qewd-server
2
3# Dockerised version of QEWD for Raspberry Pi
4
5# M/Gateway Developments Ltd
6# 22 November 2019
7
8#FROM hypriot/rpi-node:boron
9#FROM hypriot/rpi-node:8
10#FROM node:10-stretch
11FROM node:12-stretch
12
13RUN apt-get update && apt-get install -y \
14 build-essential \
15 libssl-dev \
16 dos2unix \
17 wget \
18 gzip \
19 openssh-server \
20 curl \
21 python-minimal \
22 libelf1 \
23 locate \
24 nano \
25 subversion
26
27# Create app directory
28RUN mkdir -p /opt/qewd
29WORKDIR /opt/qewd
30
31COPY install_yottadb.sh /opt/qewd
32COPY gde.txt /opt/qewd
33RUN chmod +x /opt/qewd/install_yottadb.sh
34
35RUN cd /opt/qewd
36
37# Install app dependencies
38COPY package.json /opt/qewd
39RUN npm install
40RUN npm install module-exists
41RUN npm install mg-dbx
42
43# Install YottaDB & NodeM
44
45RUN ["/opt/qewd/install_yottadb.sh"]
46
47# Bundle app source
48COPY . /opt/qewd
49
50RUN chmod +x /opt/qewd/ydb
51RUN chmod +x /opt/qewd/backup
52RUN chmod +x /opt/qewd/update_to_r128
53
54RUN mkdir /opt/qewd/www
55RUN mkdir /opt/qewd/www/qewd-monitor
56
57RUN cp /opt/qewd/node_modules/qewd-monitor/www/bundle.js /opt/qewd/www/qewd-monitor
58RUN cp /opt/qewd/node_modules/qewd-monitor/www/*.html /opt/qewd/www/qewd-monitor
59RUN cp /opt/qewd/node_modules/qewd-monitor/www/*.css /opt/qewd/www/qewd-monitor
60
61RUN cp /opt/qewd/node_modules/ewd-client/lib/proto/ewd-client.js /opt/qewd/www
62
63RUN cd /opt/qewd
64
65EXPOSE 8080
66
67#ENTRYPOINT ["/bin/bash", "-l"]
68
69CMD [ "npm", "start" ]