forked from karankoder/CrowdNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (23 loc) · 762 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
FROM node:18-alpine
WORKDIR /frontend
COPY /frontend/package.json .
COPY /frontend/yarn.lock .
COPY /frontend/.yarnrc.yml .
COPY /frontend/.yarn/releases .yarn/releases
COPY ./frontend/apps/battleship ./apps/battleship
COPY ./frontend/packages ./packages
RUN apk update
RUN apk add xsel
ARG VITE_NODE_ADDRESS \
VITE_CONTRACT_ADDRESS \
VITE_SENTRY_DSN \
VITE_GASLESS_BACKEND_ADDRESS
ENV VITE_NODE_ADDRESS=${VITE_NODE_ADDRESS} \
VITE_CONTRACT_ADDRESS=${VITE_CONTRACT_ADDRESS} \
VITE_SENTRY_DSN=${VITE_SENTRY_DSN} \
VITE_GASLESS_BACKEND_ADDRESS=${VITE_GASLESS_BACKEND_ADDRESS}
WORKDIR /frontend/apps/battleship
RUN yarn install
RUN yarn build
RUN npm install --global serve
CMD ["serve", "-s", "/frontend/apps/battleship/build"]