forked from mojaloop/central-settlement
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (19 loc) · 762 Bytes
/
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
FROM node:12.16.0-alpine as builder
WORKDIR /opt/central-settlement
RUN apk add --no-cache -t build-dependencies git make gcc g++ python libtool autoconf automake \
&& cd $(npm root -g)/npm \
&& npm config set unsafe-perm true
COPY package.json package-lock.json* /opt/central-settlement/
RUN npm install
COPY config /opt/central-settlement/config
COPY src /opt/central-settlement/src
COPY README.md /opt/central-settlement
FROM node:12.16.0-alpine
WORKDIR /opt/central-settlement
COPY --from=builder /opt/central-settlement .
RUN npm prune --production
# Create empty log file & link stdout to the application log file
RUN mkdir ./logs && touch ./logs/combined.log
RUN ln -sf /dev/stdout ./logs/combined.log
EXPOSE 3007
CMD node src/server.js