forked from echoprotocol/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 716 Bytes
/
Dockerfile
File metadata and controls
36 lines (24 loc) · 716 Bytes
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
# build environment
FROM node:10.15.3-alpine as builder
ARG NODE_APP_INSTANCE="production"
ENV NODE_ENV="production"
ENV NODE_APP_INSTANCE=$NODE_APP_INSTANCE
WORKDIR /app/
COPY . /app
RUN apk add git python
RUN git config --global http.sslverify "false"
RUN NODE_ENV=development npm install
RUN npm run build
FROM node:10.15-alpine
ARG NODE_APP_INSTANCE="production"
ENV NODE_ENV="production"
ENV NODE_APP_INSTANCE=$NODE_APP_INSTANCE
WORKDIR /app
ENV NODE_ENV="production"
ENV NODE_APP_INSTANCE=$NODE_APP_INSTANCE
COPY --from=builder /app/dist /app/dist
COPY ./server.js /app/
COPY ./config /app/config
COPY ./package.json /app/package.json
RUN NODE_ENV=development npm install
CMD ["node", "server.js"]