Skip to content
Snippets Groups Projects
Commit dc4eb621 authored by rromanov's avatar rromanov
Browse files

Changed pipeline schema

parent 4b2b7455
Branches
Tags
No related merge requests found
......@@ -20,5 +20,5 @@ variables:
################################################################################
include:
- project: infrastructure-team/operations/mashroom
file: /CICD/pipelines/frontend-main-cicd.yaml
- project: infrastructure-team/operations/cicd
file: /pipelines/frontend-nodejs-cicd.yaml
################################################################################
### BUILD ###
################################################################################
# syntax=docker/dockerfile:1
ARG REGISTRY
ARG VERSION
FROM $REGISTRY/infrastructure-team/operations/imagebaykery/nodejsbuild:$VERSION AS builder
ARG NODE_ENV
ENV NODE_ENV=$NODE_ENV
WORKDIR /main-next
### "git-rev-sync" dependency needs .git folder to be copied;
### Check that .git folder not in .dockerignore
### Will not build without .git folder;
COPY . .
RUN yarn install --frozen-lockfile --ignore-engines
RUN yarn build
COPY .yarnclean-production ./.yarnclean
RUN yarn install --production
################################################################################
### PRODUCTION ###
################################################################################
ARG VERSION
FROM node:$VERSION-alpine as production
ENV NODE_ENV=production
RUN apk --no-cache add curl bash gifsicle
WORKDIR /app
COPY --from=builder /main-next/public ./public/
COPY --from=builder /main-next/yarn.lock .
COPY --from=builder /main-next/.env .
COPY --from=builder /main-next/next.config.js .
COPY --from=builder /main-next/server.js .
COPY --from=builder /main-next/node_modules ./node_modules/
COPY --from=builder /main-next/.next ./.next/
CMD node -r dotenv-flow/config server.js
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment