-
Notifications
You must be signed in to change notification settings - Fork 85
/
Dockerfile
84 lines (69 loc) · 2.9 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Stage 1 - the build process
FROM node:16 AS build
WORKDIR /usr/src/app
COPY yarn.lock .
COPY package.json .
COPY .eslintrc.json .
COPY packages/dapp/src ./packages/dapp/src
COPY packages/dapp/public ./packages/dapp/public
COPY packages/dapp/package.json ./packages/dapp/package.json
COPY packages/dapp/jsconfig.json ./packages/dapp/jsconfig.json
COPY packages/dapp/.eslintrc.json ./packages/dapp/.eslintrc.json
ARG REACT_APP_DEFAULT_BRIDGE_DIRECTION
ARG REACT_APP_ENABLED_BRIDGES
ARG REACT_APP_INFURA_ID
ARG REACT_APP_GAS_PRICE_FALLBACK_GWEI
ARG REACT_APP_GAS_PRICE_SUPPLIER_URL
ARG REACT_APP_GAS_PRICE_SPEED_TYPE
ARG REACT_APP_GAS_PRICE_UPDATE_INTERVAL
ARG REACT_APP_ETH_PRICE_API_URL
ARG REACT_APP_ETH_PRICE_UPDATE_INTERVAL
ARG REACT_APP_TITLE
ARG REACT_APP_DESCRIPTION
ARG REACT_APP_UI_STATUS_UPDATE_INTERVAL
ARG REACT_APP_DEBUG_LOGS
ARG REACT_APP_GRAPH_HEALTH_UPDATE_INTERVAL
ARG REACT_APP_GRAPH_HEALTH_THRESHOLD_BLOCKS
ARG REACT_APP_XDAI_RPC_URL
ARG REACT_APP_POA_RPC_URL
ARG REACT_APP_SOKOL_RPC_URL
ARG REACT_APP_MAINNET_RPC_URL
ARG REACT_APP_KOVAN_RPC_URL
ARG REACT_APP_BSC_RPC_URL
ARG REACT_APP_COINZILLA_API_KEY
ARG REACT_APP_OWLRACLE_API_KEY
ARG REACT_APP_SENTRY_DSN
ENV REACT_APP_DEFAULT_BRIDGE_DIRECTION $REACT_APP_DEFAULT_BRIDGE_DIRECTION
ENV REACT_APP_ENABLED_BRIDGES $REACT_APP_ENABLED_BRIDGES
ENV REACT_APP_INFURA_ID $REACT_APP_INFURA_ID
ENV REACT_APP_GAS_PRICE_FALLBACK_GWEI $REACT_APP_GAS_PRICE_FALLBACK_GWEI
ENV REACT_APP_GAS_PRICE_SUPPLIER_URL $REACT_APP_GAS_PRICE_SUPPLIER_URL
ENV REACT_APP_GAS_PRICE_SPEED_TYPE $REACT_APP_GAS_PRICE_SPEED_TYPE
ENV REACT_APP_GAS_PRICE_UPDATE_INTERVAL $REACT_APP_GAS_PRICE_UPDATE_INTERVAL
ENV REACT_APP_ETH_PRICE_API_URL $REACT_APP_ETH_PRICE_API_URL
ENV REACT_APP_ETH_PRICE_UPDATE_INTERVAL $REACT_APP_ETH_PRICE_UPDATE_INTERVAL
ENV REACT_APP_TITLE $REACT_APP_TITLE
ENV REACT_APP_DESCRIPTION $REACT_APP_DESCRIPTION
ENV REACT_APP_UI_STATUS_UPDATE_INTERVAL $REACT_APP_UI_STATUS_UPDATE_INTERVAL
ENV REACT_APP_DEBUG_LOGS $REACT_APP_DEBUG_LOGS
ENV REACT_APP_GRAPH_HEALTH_UPDATE_INTERVAL $REACT_APP_GRAPH_HEALTH_UPDATE_INTERVAL
ENV REACT_APP_GRAPH_HEALTH_THRESHOLD_BLOCKS $REACT_APP_GRAPH_HEALTH_THRESHOLD_BLOCKS
ENV REACT_APP_XDAI_RPC_URL $REACT_APP_XDAI_RPC_URL
ENV REACT_APP_POA_RPC_URL $REACT_APP_POA_RPC_URL
ENV REACT_APP_SOKOL_RPC_URL $REACT_APP_SOKOL_RPC_URL
ENV REACT_APP_MAINNET_RPC_URL $REACT_APP_MAINNET_RPC_URL
ENV REACT_APP_KOVAN_RPC_URL $REACT_APP_KOVAN_RPC_URL
ENV REACT_APP_BSC_RPC_URL $REACT_APP_BSC_RPC_URL
ENV REACT_APP_COINZILLA_API_KEY $REACT_APP_COINZILLA_API_KEY
ENV REACT_APP_OWLRACLE_API_KEY $REACT_APP_OWLRACLE_API_KEY
ENV REACT_APP_SENTRY_DSN $REACT_APP_SENTRY_DSN
RUN yarn install --frozen-lockfile
RUN yarn dapp:build
# Stage 2 - the production environment
FROM nginx:alpine
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=build /usr/src/app/packages/dapp/build .
EXPOSE 3000
ENTRYPOINT ["nginx", "-g", "daemon off;"]