forked from diva-exchange/diva
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (39 loc) · 1.11 KB
/
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
FROM node:lts-alpine
LABEL author="Konrad Baechler <[email protected]>" \
maintainer="Konrad Baechler <[email protected]>" \
name="diva" \
description="Distributed value exchange upholding security, reliability and privacy" \
url="https://diva.exchange"
COPY package.json /home/node/package.json
COPY ecosystem.config.js /home/node/ecosystem.config.js
# Applications
COPY app /home/node/app
# Entrypoint
COPY entrypoint.sh /
ENV NPM_CONFIG_LOGLEVEL warn
RUN rm -R /home/node/app/test \
&& apk --no-cache --virtual build-dependendencies add \
make \
gcc \
g++ \
libtool \
binutils \
build-base \
autoconf \
automake \
python3 \
&& cd /home/node/ \
&& npm install node-gyp -g \
&& apk --no-cache add \
sqlite \
# install the application
&& npm install --production \
&& chown -R node:node "/home/node" \
&& npm uninstall node-gyp -g \
&& apk --no-cache --purge del build-dependendencies \
&& chmod +x /entrypoint.sh
# Create the volume to keep the nodeJS Data
VOLUME [ "/home/node/" ]
# 3901 divaapp, 3902 diva.api
EXPOSE 3901 3902
ENTRYPOINT ["/entrypoint.sh"]