1 | # qewd-server
|
2 |
|
3 | # Dockerised version of QEWD
|
4 |
|
5 | # M/Gateway Developments Ltd
|
6 | # 14 November 2019
|
7 |
|
8 | #FROM node:boron
|
9 | #FROM node:carbon
|
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 | RUN echo 'deb http://ftp.debian.org/debian/ buster main' >> /etc/apt/sources.list
|
28 | RUN apt-get update
|
29 | RUN apt-get -t buster install -y libc6 libncurses6
|
30 |
|
31 | # Create app directory
|
32 | RUN mkdir -p /opt/qewd
|
33 | WORKDIR /opt/qewd
|
34 |
|
35 | COPY install_yottadb.sh /opt/qewd
|
36 | COPY gde.txt /opt/qewd
|
37 | RUN chmod +x /opt/qewd/install_yottadb.sh
|
38 |
|
39 | RUN cd /opt/qewd
|
40 |
|
41 | # Install app dependencies
|
42 | COPY package.json /opt/qewd
|
43 | RUN npm install -g npm@latest
|
44 | RUN npm install
|
45 | RUN npm install module-exists
|
46 | RUN npm install mg-dbx
|
47 |
|
48 | # Install YottaDB & NodeM
|
49 |
|
50 | RUN ["/opt/qewd/install_yottadb.sh"]
|
51 |
|
52 | # Bundle app source
|
53 | COPY . /opt/qewd
|
54 |
|
55 | RUN chmod +x /opt/qewd/ydb
|
56 | RUN chmod +x /opt/qewd/backup
|
57 | RUN chmod +x /opt/qewd/update_to_r128
|
58 |
|
59 | RUN mkdir /opt/qewd/www
|
60 | RUN mkdir /opt/qewd/www/qewd-monitor
|
61 |
|
62 | RUN cp /opt/qewd/node_modules/qewd-monitor/www/bundle.js /opt/qewd/www/qewd-monitor
|
63 | RUN cp /opt/qewd/node_modules/qewd-monitor/www/*.html /opt/qewd/www/qewd-monitor
|
64 | RUN cp /opt/qewd/node_modules/qewd-monitor/www/*.css /opt/qewd/www/qewd-monitor
|
65 |
|
66 | RUN cp /opt/qewd/node_modules/ewd-client/lib/proto/ewd-client.js /opt/qewd/www
|
67 |
|
68 | RUN cd /opt/qewd
|
69 |
|
70 | EXPOSE 8080
|
71 |
|
72 | # ENTRYPOINT ["/bin/bash", "-l"]
|
73 |
|
74 | CMD [ "npm", "start" ]
|