Update pipeline script

This commit is contained in:
Murtadha 2024-07-12 00:42:37 -04:00
parent e603d507e1
commit 8f76a818c8
2 changed files with 3 additions and 2 deletions

View file

@ -55,6 +55,8 @@ pipeline:
script: script:
- cd /home/mnisyif/docker-containers/mnisyif/frontend - cd /home/mnisyif/docker-containers/mnisyif/frontend
- DOCKER_TAG=$(echo ${CI_COMMIT_SHA} | cut -c1-8) - DOCKER_TAG=$(echo ${CI_COMMIT_SHA} | cut -c1-8)
- ls -la # This will list all files in the current directory
- cat Dockerfile # This will show the content of the Dockerfile
- docker build -t frontend:$DOCKER_TAG . - docker build -t frontend:$DOCKER_TAG .
- docker stop frontend || true - docker stop frontend || true
- docker rm frontend || true - docker rm frontend || true

View file

@ -1,8 +1,7 @@
FROM node:22 as build FROM node:22 as build
WORKDIR /app WORKDIR /app
RUN npm install -g npm@10.8.2 RUN npm install -g npm@10.8.2
COPY package.json ./ COPY package*.json ./
COPY package-lock.json ./
RUN npm install RUN npm install
COPY . . COPY . .
RUN npm run build RUN npm run build