-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
47 lines (36 loc) · 931 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright (C) 2021 Edge Network Technologies Limited
# Use of this source code is governed by a GNU GPL-style license
# that can be found in the LICENSE.md file. All rights reserved.
#
# 1. Build the Vue app
#
FROM node:16 AS build
COPY *.config.js ./
COPY package*.json ./
RUN npm install
COPY index.html ./
COPY src src/
COPY public public/
ARG BLOCKCHAIN_API_URL
ARG BRIDGE_WALLET_ADDRESS
ARG EXPLORER_URL
ARG GOVERNANCE_URL
ARG INDEX_API_URL
ARG IS_TESTNET
ENV VITE_BLOCKCHAIN_API_URL=$BLOCKCHAIN_API_URL
ENV VITE_BRIDGE_WALLET_ADDRESS=$BRIDGE_WALLET_ADDRESS
ENV VITE_EXPLORER_URL=$EXPLORER_URL
ENV VITE_GOVERNANCE_URL=$GOVERNANCE_URL
ENV VITE_INDEX_API_URL=$INDEX_API_URL
ENV VITE_IS_TESTNET=$IS_TESTNET
RUN npm run build
#
# 2. Copy the files over and run it
#
FROM node:16
WORKDIR /edge/wallet
COPY server ./
RUN npm install --only=production
ENV WWW_PATH=dist
COPY --from=build dist dist/
CMD ["npm", "start"]