From 63eaba2579820e1815bd9108382ee5d9bd4938e0 Mon Sep 17 00:00:00 2001 From: nataliaweni Date: Thu, 2 Jan 2025 15:00:08 -0300 Subject: [PATCH] Update dockerfile --- .github/workflows/build-preview-front-ecr-shared.yaml | 4 ++-- frontend/docker/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-preview-front-ecr-shared.yaml b/.github/workflows/build-preview-front-ecr-shared.yaml index c81a886..4383392 100644 --- a/.github/workflows/build-preview-front-ecr-shared.yaml +++ b/.github/workflows/build-preview-front-ecr-shared.yaml @@ -13,10 +13,10 @@ jobs: - name: Set variables run: | TAG="$( echo "${GITHUB_REF}" | cut -d'/' -f3 )" - if grep -qs -e '^.*.*-staging' <<< "${TAG}" ; then + if grep -qs -e '^.*.*-front-staging' <<< "${TAG}" ; then echo "Found environment: STAGING - ${TAG}" echo "MANIFESTS_ENVIRONMENT=staging" | tee -a "${GITHUB_ENV}" - elif grep -qs -e '^.*.*' <<< "${TAG}" ; then + elif grep -qs -e '^.*.*-front' <<< "${TAG}" ; then echo "No environment found, assuming: PRODUCTION - ${TAG}" echo "MANIFESTS_ENVIRONMENT=production" | tee -a "${GITHUB_ENV}" else diff --git a/frontend/docker/Dockerfile b/frontend/docker/Dockerfile index 049dff0..d043b11 100644 --- a/frontend/docker/Dockerfile +++ b/frontend/docker/Dockerfile @@ -4,11 +4,11 @@ WORKDIR /app RUN apk add --no-cache git -COPY frontend/package.json frontend/package-lock.json ./ +COPY package.json package-lock.json ./ RUN --mount=type=cache,target=/root/.npm NPM_CONFIG_CACHE=/root/.npm npm install -COPY frontend/ ./ +COPY . ./ RUN npm run build