-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile.static
34 lines (30 loc) · 989 Bytes
/
Dockerfile.static
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
# Static web site compiler
FROM node:14 as builder
ARG COMMIT_SHA
ENV COMMIT_SHA=${COMMIT_SHA}
ARG VOCDONI_ENVIRONMENT="dev"
ENV VOCDONI_ENVIRONMENT=${VOCDONI_ENVIRONMENT}
ARG NODE_ENV="development"
ENV NODE_ENV=${NODE_ENV}
ARG ETH_NETWORK_ID
ENV ETH_NETWORK_ID=${ETH_NETWORK_ID}
ARG ETH_CHAIN_ID
ENV ETH_CHAIN_ID=${ETH_CHAIN_ID}
ARG ETHERSCAN_PREFIX
ENV ETHERSCAN_PREFIX=${ETHERSCAN_PREFIX}
ARG BLOCK_TIME
ENV BLOCK_TIME=${BLOCK_TIME}
ARG BOOTNODES_URL="https://bootnodes.vocdoni.net/gateways.dev.json"
ENV BOOTNODES_URL=${BOOTNODES_URL}
ARG SIGNALING_ORACLE_URL="https://signaling-oracle.dev.vocdoni.net/dvote"
ENV SIGNALING_ORACLE_URL=${SIGNALING_ORACLE_URL}
ARG ANALYTICS_KEY="1w2W1aAJRMbVRAgHVOIRVVIh1Nc"
ENV ANALYTICS_KEY=${ANALYTICS_KEY}
ARG FORTMATIC_API_KEY="pk_test_A5D318B08D001541"
ENV FORTMATIC_API_KEY=${FORTMATIC_API_KEY}
ADD . /app
WORKDIR /app
RUN npm install && npm run export
## Static web server
FROM nginx:1.19
COPY --from=builder /app/build /usr/share/nginx/html