forked from Patrik-Stas/indyscan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (35 loc) · 1.38 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:12.14.0-alpine3.9 as BUILD
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
RUN apk add make
RUN apk add g++
RUN apk add python
RUN npm install -g [email protected]
WORKDIR /usr/src/app/indyscan-api-client
COPY indyscan-api-client ./
RUN npm ci --only=prod
WORKDIR /usr/src/app/indyscan-txtype
COPY indyscan-txtype ./
RUN npm ci --only=prod
WORKDIR /usr/src/app/indyscan-webapp
COPY indyscan-webapp ./
RUN npm ci --legacy-peer-deps
RUN npm run build
RUN npm prune --production --legacy-peer-deps
FROM node:12.14.0-alpine3.9 as PRODUCTION
RUN apk update && apk upgrade
COPY --from=BUILD /usr/src/app/indyscan-webapp /usr/src/app/indyscan-webapp
COPY --from=BUILD /usr/src/app/indyscan-api-client /usr/src/app/indyscan-api-client
COPY --from=BUILD /usr/src/app/indyscan-txtype /usr/src/app/indyscan-txtype
WORKDIR /usr/src/app/indyscan-webapp
ENV PORT ${PORT:-"3707"}
ENV INDYSCAN_API_URL ${INDYSCAN_API_URL:-"3708"}
ENV LOG_LEVEL ${LOG_LEVEL:-"info"}
ENV LOG_HTTP_REQUESTS ${LOG_HTTP_REQUESTS:-"false"}
ENV LOG_HTTP_RESPONSES ${LOG_HTTP_RESPONSES:-"false"}
EXPOSE ${PORT}
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.name="indyscan-webapp"
LABEL org.label-schema.descriptsion="Serverside rendered UI for viewing Hyperledger Indy transactions via Indyscan API"
LABEL org.label-schema.vcs-url="https://github.com/Patrik-Stas/indyscan"
CMD npm run serve