-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1773 from IntersectMBO/dockerfile-dev
add new dockerfile
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM node:18-alpine as builder | ||
|
||
ARG VITE_APP_ENV='beta' | ||
ARG VITE_BASE_URL | ||
ARG VITE_METADATA_API_URL | ||
ARG VITE_GTM_ID | ||
ARG VITE_NETWORK_FLAG=0 | ||
ARG VITE_SENTRY_DSN | ||
ARG NPMRC_TOKEN | ||
ARG VITE_USERSNAP_SPACE_API_KEY | ||
ARG VITE_IS_PROPOSAL_DISCUSSION_FORUM_ENABLED='true' | ||
ARG VITE_PDF_API_URL | ||
|
||
ENV NODE_OPTIONS=--max_old_space_size=8192 | ||
|
||
WORKDIR /src | ||
|
||
# Set npm configuration settings using environment variables | ||
RUN npm config set @intersect.mbo:registry "https://registry.npmjs.org/" --location=global | ||
RUN npm config set //registry.npmjs.org/:_authToken ${NPMRC_TOKEN} --location=global | ||
|
||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
COPY . . | ||
RUN npm run build | ||
|
||
FROM nginx:stable-alpine | ||
EXPOSE 80 | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
COPY --from=builder /src/maintenance-page/index.html /usr/share/nginx/html/maintenance.html | ||
COPY --from=builder /src/dist /usr/share/nginx/html |