From f17fd33120dc49ac42892743550c77c02c2d3b5f Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 24 Jun 2022 14:51:08 +0200 Subject: [PATCH] chore(build): Creating separate build for cicd Signed-off-by: rjshrjndrn --- .github/workflows/frontend.yaml | 1 + frontend/Dockerfile | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/frontend.yaml b/.github/workflows/frontend.yaml index e463c5d3e..17ab38206 100644 --- a/.github/workflows/frontend.yaml +++ b/.github/workflows/frontend.yaml @@ -48,6 +48,7 @@ jobs: run: | cd frontend docker run --rm -v /etc/passwd:/etc/passwd -u `id -u`:`id -g` -v $(pwd):/home/${USER} -w /home/${USER} --name node_build node:14-stretch-slim /bin/bash -c "yarn && yarn build" + docker build --target=cicd -t $DOCKER_REPO/frontend:${IMAGE_TAG} . docker push $DOCKER_REPO/frontend:${IMAGE_TAG} - name: Creating old image input run: | diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 28d66bd42..84e9d1c08 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -9,3 +9,10 @@ LABEL maintainer=Rajesh COPY --from=builder /work/public /var/www/openreplay COPY nginx.conf /etc/nginx/conf.d/default.conf + +FROM nginx:alpine as cicd +LABEL maintainer=Rajesh + +COPY public /var/www/openreplay +COPY nginx.conf /etc/nginx/conf.d/default.conf +