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
|
11 | FROM node:12-stretch
|
12 |
|
13 | RUN 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
|
28 | RUN mkdir -p /opt/qewd
|
29 | WORKDIR /opt/qewd
|
30 |
|
31 | COPY install_yottadb.sh /opt/qewd
|
32 | COPY gde.txt /opt/qewd
|
33 | RUN chmod +x /opt/qewd/install_yottadb.sh
|
34 |
|
35 | RUN cd /opt/qewd
|
36 |
|
37 | # Install app dependencies
|
38 | COPY package.json /opt/qewd
|
39 | RUN npm install
|
40 | RUN npm install module-exists
|
41 | RUN npm install mg-dbx
|
42 |
|
43 | # Install YottaDB & NodeM
|
44 |
|
45 | RUN ["/opt/qewd/install_yottadb.sh"]
|
46 |
|
47 | # Bundle app source
|
48 | COPY . /opt/qewd
|
49 |
|
50 | RUN chmod +x /opt/qewd/ydb
|
51 | RUN chmod +x /opt/qewd/backup
|
52 | RUN chmod +x /opt/qewd/update_to_r128
|
53 |
|
54 | RUN mkdir /opt/qewd/www
|
55 | RUN mkdir /opt/qewd/www/qewd-monitor
|
56 |
|
57 | RUN cp /opt/qewd/node_modules/qewd-monitor/www/bundle.js /opt/qewd/www/qewd-monitor
|
58 | RUN cp /opt/qewd/node_modules/qewd-monitor/www/*.html /opt/qewd/www/qewd-monitor
|
59 | RUN cp /opt/qewd/node_modules/qewd-monitor/www/*.css /opt/qewd/www/qewd-monitor
|
60 |
|
61 | RUN cp /opt/qewd/node_modules/ewd-client/lib/proto/ewd-client.js /opt/qewd/www
|
62 |
|
63 | RUN cd /opt/qewd
|
64 |
|
65 | EXPOSE 8080
|
66 |
|
67 | #ENTRYPOINT ["/bin/bash", "-l"]
|
68 |
|
69 | CMD [ "npm", "start" ]
|