From 04548cb71f7b9584120f1955aff04ff5732869d3 Mon Sep 17 00:00:00 2001 From: mpavlovicbb Date: Wed, 21 Aug 2024 13:32:22 +0200 Subject: [PATCH] add new dockerfile --- govtool/frontend/Dockerfile.qovery | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 govtool/frontend/Dockerfile.qovery diff --git a/govtool/frontend/Dockerfile.qovery b/govtool/frontend/Dockerfile.qovery new file mode 100644 index 000000000..33e83cbe9 --- /dev/null +++ b/govtool/frontend/Dockerfile.qovery @@ -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