-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,40 @@ | ||
FROM node:18-alpine | ||
|
||
MAINTAINER gear | ||
FROM node:18-alpine AS builder | ||
|
||
WORKDIR /opt | ||
|
||
COPY . . | ||
RUN apk add --no-cache xsel | ||
|
||
RUN apk update | ||
COPY package.json yarn.lock ./ | ||
|
||
RUN apk add xsel | ||
RUN yarn install --frozen-lockfile | ||
|
||
COPY . . | ||
|
||
ARG VITE_WALLET_CONNECT_PROJECT_ID | ||
ARG VITE_GEAR_API_NODE | ||
ARG VITE_ETH_NODE_ADDRESS | ||
ARG VITE_CONTRACT_ADDRESS | ||
|
||
ARG VITE_WALLET_CONNECT_PROJECT_ID \ | ||
VITE_GEAR_API_NODE \ | ||
VITE_ETH_NODE_ADDRESS \ | ||
VITE_CONTRACT_ADDRESS | ||
ENV VITE_WALLET_CONNECT_PROJECT_ID=${VITE_WALLET_CONNECT_PROJECT_ID} \ | ||
VITE_CONTRACT_ADDRESS=${VITE_CONTRACT_ADDRESS} \ | ||
VITE_GEAR_API_NODE=${VITE_GEAR_API_NODE} \ | ||
VITE_ETH_NODE_ADDRESS=${VITE_ETH_NODE_ADDRESS} \ | ||
DISABLE_ESLINT_PLUGIN=true | ||
|
||
RUN yarn install | ||
RUN yarn build && yarn cache clean | ||
|
||
RUN yarn build | ||
|
||
FROM node:18-alpine | ||
|
||
WORKDIR /opt | ||
|
||
RUN npm install --global serve | ||
|
||
CMD ["serve", "-s", "/opt/dist"] | ||
COPY --from=builder /opt/dist ./dist | ||
|
||
ARG NODE_ENV | ||
ENV NODE_ENV=${NODE_ENV} | ||
|
||
EXPOSE 4173 | ||
|
||
CMD ["serve", "-s", "dist"] |