-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
35 lines (26 loc) · 1.02 KB
/
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:20.10.0 AS build
ARG VITE_PROJECT_ID
ARG VITE_GEONAMES_USERNAME
ARG VITE_API_URL
ARG VITE_HISTORY_URL
ARG VITE_REFERRAL_URL
ARG VITE_WEBSOCKET_URL
ARG VITE_CANDLES_WEBSOCKET_URL
ARG VITE_HTTP_RPC
ARG VITE_PRICE_FEEDS
ARG VITE_ENABLED_CHAINS
ARG VITE_WELCOME_MODAL
WORKDIR /app
COPY package*.json ./
COPY ./patches ./patches
RUN npm install
COPY . .
RUN echo "VITE_PROJECT_ID=${VITE_PROJECT_ID}\n""VITE_GEONAMES_USERNAME=${VITE_GEONAMES_USERNAME}\n""VITE_HTTP_RPC=${VITE_HTTP_RPC}\n""VITE_PRICE_FEEDS=${VITE_PRICE_FEEDS}\n""VITE_WEBSOCKET_URL=${VITE_WEBSOCKET_URL}\n""VITE_CANDLES_WEBSOCKET_URL=${VITE_CANDLES_WEBSOCKET_URL}\n""VITE_HISTORY_URL=${VITE_HISTORY_URL}\n""VITE_REFERRAL_URL=${VITE_REFERRAL_URL}\n""VITE_API_URL=${VITE_API_URL}\n""VITE_ENABLED_CHAINS=${VITE_ENABLED_CHAINS}\n""VITE_WELCOME_MODAL=${VITE_WELCOME_MODAL}" > .env
RUN npm run build
FROM nginxinc/nginx-unprivileged:latest
USER root
RUN mkdir /app
COPY --from=build /app/nginx /etc/nginx/conf.d/
USER nginx
WORKDIR /app
COPY --from=build /app/build /app/html