feat: add cicd config

This commit is contained in:
saeid_01
2023-10-25 22:06:40 +03:30
parent a5786f91d1
commit 5a946549a4
4 changed files with 376 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
# Build Stage
FROM docker.willaspace.com/repository/docker-hosted/node:14 as build-stage
ARG REGISTRY_TOKEN
ARG REGISTRY_PROXY
WORKDIR /app
COPY package*.json ./
RUN npm config set registry=$REGISTRY_PROXY
RUN npm config set //repo.willaspace.com/repository/npm-proxy/:_auth=$REGISTRY_TOKEN
RUN npm install
COPY ./ .
RUN npm run build
# production stage
FROM docker.willaspace.com/repository/docker-hosted/nginx as production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf