-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseismo-server-dockerfile
59 lines (40 loc) · 1.08 KB
/
seismo-server-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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM ubuntu:18.04
RUN apt update -y && \
DEBIAN_FRONTEND='noninteractive' \
DEBCONF_NONINTERACTIVE_SEEN='true' \
apt install -y \
apache2 \
build-essential \
git \
libcairo2-dev \
libgif-dev \
libjpeg-dev \
libpango1.0-dev \
librsvg2-dev \
mongodb \
nodejs \
npm \
pkg-config
RUN useradd \
--create-home \
--user-group \
seismo
RUN npm install \
--global \
bower
WORKDIR /home/seismo
COPY submodules/seismogram-app seismogram-app
COPY patches/ patches/
COPY run-seismo-server.sh run-seismo-server.sh
RUN chown --recursive 'seismo:seismo' '/home/seismo'
USER seismo
RUN patch 'seismogram-app/data-tools/mongo-import.sh' 'patches/mongo-import.sh.patch'
RUN patch 'seismogram-app/server/processing-routes.js' 'patches/processing-routes.js.patch'
RUN patch 'seismogram-app/server/query-routes.js' 'patches/query-routes.js.patch'
WORKDIR /home/seismo/seismogram-app/data-tools
RUN npm install
RUN node jsonize.js
WORKDIR /home/seismo/seismogram-app/server
RUN npm install
RUN cp config.example.js config.js
CMD [ "/home/seismo/run-seismo-server.sh" ]