forked from ChainSafe/eth2-light-client-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (27 loc) · 817 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
30
# build env
FROM node:16.14.0 as build
# set working directory
WORKDIR /app
# install app dependencies
COPY package.json ./
RUN yarn install --frozen-lockfile --ignore-optional
# add app
COPY . ./
#SET API URL
ARG REACT_APP_MAINNET_BEACON_API
ARG REACT_APP_PRATER_BEACON_API
ARG REACT_APP_KILN_BEACON_API
ARG REACT_APP_KILN_EXECUTION_API
ENV REACT_APP_MAINNET_BEACON_API=$REACT_APP_MAINNET_BEACON_API
ENV REACT_APP_PRATER_BEACON_API=$REACT_APP_PRATER_BEACON_API
ENV REACT_APP_KILN_BEACON_API=$REACT_APP_KILN_BEACON_API
ENV REACT_APP_KILN_EXECUTION_API=$REACT_APP_KILN_EXECUTION_API
# build app
RUN yarn build
# production env
FROM nginx:stable-alpine
#copy build artifacts from build stage
COPY --from=build /app/build /usr/share/nginx/html
#expose nginx on port 80
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]