From 13bd81fd159ee126cc9f5926a01bd86b17147583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Thu, 4 Jul 2024 07:56:01 +0200 Subject: [PATCH] chore: Update Dockerfile and deployment script to use /app directory instead of /usr/src/app --- .gitlab-ci.yml | 2 +- Dockerfile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7d218fc..ff8c883 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,7 +35,7 @@ deploy-job: . ~/.zshrc && cd /var/www/$CI_PROJECT_NAME && git pull && - docker cp dist-$CI_JOB_ID $DOCKER_CONTAINER:/usr/src/app/ && + docker cp dist-$CI_JOB_ID $DOCKER_CONTAINER:/app/ && docker exec $DOCKER_CONTAINER rm -rf dist && docker exec $DOCKER_CONTAINER mv dist-$CI_JOB_ID/dist dist && docker exec $DOCKER_CONTAINER rm -rf dist-$CI_JOB_ID && diff --git a/Dockerfile b/Dockerfile index bb2f114..7af632e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM node:20.15.0-alpine -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app +RUN mkdir -p /app +WORKDIR /app RUN apk update && apk upgrade RUN apk add git -COPY . /usr/src/app/ +COPY . /app/ RUN npm install pm2 -g RUN npm install -g pnpm RUN pnpm install