This repository has been archived by the owner on Nov 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
51 lines (35 loc) · 1.51 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
49
50
51
FROM node:lts-alpine as build-stage
WORKDIR /app
ARG VUE_APP_SNWBRD_BOOTSTRAP_HOST
ARG VUE_APP_SNWBRD_BOOTSTRAP_PROTOCOL
ARG VUE_APP_SNWBRD_BOOTSTRAP_CHAIN_ID
ARG VUE_APP_SNWBRD_BOOTSTRAP_PORT
ARG VUE_APP_SNWBRD_BOOTSTRAP_NETWORK_ID
ARG VUE_APP_SNWBRD_ENABLED_KEYSTORE_CREATION
# 'LOCAL' NODE RELATED CONFIG
ARG VUE_APP_SNWBRD_NODE_HOST
ARG VUE_APP_SNWBRD_NODE_PROTOCOL
ARG VUE_APP_SNWBRD_NODE_CHAIN_ID
ARG VUE_APP_SNWBRD_NODE_PORT
ARG VUE_APP_SNWBRD_NODE_NETWORK_ID
ENV VUE_APP_SNWBRD_BOOTSTRAP_HOST $VUE_APP_SNWBRD_BOOTSTRAP_HOST
ENV VUE_APP_SNWBRD_BOOTSTRAP_PROTOCOL $VUE_APP_SNWBRD_BOOTSTRAP_PROTOCOL
ENV VUE_APP_SNWBRD_BOOTSTRAP_CHAIN_ID $VUE_APP_SNWBRD_BOOTSTRAP_CHAIN_ID
ENV VUE_APP_SNWBRD_BOOTSTRAP_PORT $VUE_APP_SNWBRD_BOOTSTRAP_PORT
ENV VUE_APP_SNWBRD_BOOTSTRAP_NETWORK_ID $VUE_APP_SNWBRD_BOOTSTRAP_NETWORK_ID
ENV VUE_APP_SNWBRD_ENABLED_KEYSTORE_CREATION $VUE_APP_SNWBRD_ENABLED_KEYSTORE_CREATION
ENV VUE_APP_SNWBRD_NODE_HOST $VUE_APP_SNWBRD_NODE_HOST
ENV VUE_APP_SNWBRD_NODE_PROTOCOL $VUE_APP_SNWBRD_NODE_PROTOCOL
ENV VUE_APP_SNWBRD_NODE_CHAIN_ID $VUE_APP_SNWBRD_NODE_CHAIN_ID
ENV VUE_APP_SNWBRD_NODE_PORT $VUE_APP_SNWBRD_NODE_PORT
ENV VUE_APP_SNWBRD_NODE_NETWORK_ID $VUE_APP_SNWBRD_NODE_NETWORK_ID
COPY package.json yarn.lock ./
RUN yarn
COPY . .
RUN yarn build
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY env2js.sh ./
RUN ["chmod", "+x", "./env2js.sh"]
EXPOSE 80
CMD sh -c './env2js.sh > /usr/share/nginx/html/config.js && nginx -g "daemon off;"'