Skip to content

Commit

Permalink
chore: Update Dockerfile and deployment script to use /app directory …
Browse files Browse the repository at this point in the history
…instead of /usr/src/app
  • Loading branch information
ewilan-riviere committed Jul 4, 2024
1 parent d9ab2ac commit 13bd81f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 13bd81f

Please sign in to comment.