From 9a624e5df7b2213f3fd3f63bb431f9b422f32b31 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Fri, 5 Jan 2024 20:49:12 +0100 Subject: [PATCH 01/51] feed jenkinsfile --- Jenkinsfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..4379ed5 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,29 @@ +pipeline { + agent { label 'jenkins-nodejs-agent' } + + + + + stages { + stage('Build static content') { + steps { + sh ''' + sudo npm install + sudo npm run build + sleep 100000000 + #sudo docker build -t bbuddy/bbuddy_backend-dev:latest . + ''' + } + } + stage('Push image to harbor ') { + steps { + sh ''' + #sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz' + #sudo docker tag bbuddy/bbuddy_backend-dev:1.0.0 harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy-ui:latest + #sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy-ui:latest + + ''' + } + } + } +} \ No newline at end of file From b9f7e220553191796327b6688b566e456a5a251f Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Fri, 5 Jan 2024 20:52:46 +0100 Subject: [PATCH 02/51] . --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4379ed5..ade2a64 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,6 +18,7 @@ pipeline { stage('Push image to harbor ') { steps { sh ''' + # #sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz' #sudo docker tag bbuddy/bbuddy_backend-dev:1.0.0 harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy-ui:latest #sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy-ui:latest From 83ac30fda1754801b98163367a7be78f58b3dd6e Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Fri, 5 Jan 2024 21:26:28 +0100 Subject: [PATCH 03/51] rm sleep --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ade2a64..f1dd160 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,6 @@ pipeline { sh ''' sudo npm install sudo npm run build - sleep 100000000 #sudo docker build -t bbuddy/bbuddy_backend-dev:latest . ''' } From 722c956e1f1c10c112c627e3cf55cd55eaccd515 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Tue, 9 Jan 2024 17:16:07 +0100 Subject: [PATCH 04/51] conf docker jenkins --- Dockerfile | 18 ++++-------------- Dockerfile copy | 15 +++++++++++++++ Dockerfile copy 2 | 12 ++++++++++++ Dockerfile.inbound | 15 +++++++++++++++ Dockerfile.test | 13 +++++++++++++ 5 files changed, 59 insertions(+), 14 deletions(-) create mode 100644 Dockerfile copy create mode 100644 Dockerfile copy 2 create mode 100644 Dockerfile.inbound create mode 100644 Dockerfile.test diff --git a/Dockerfile b/Dockerfile index d211e44..6eef6bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,5 @@ -FROM jenkins/inbound-agent +FROM node:21-bookworm AS build -USER root - -RUN apt-get update ;\ - apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common - -RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ - apt-get update ;\ - apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin - -RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ - sudo bash nodesource_setup.sh ;\ - apt-get -y install nodejs \ No newline at end of file +RUN node -v +WORKDIR /app +COPY . . \ No newline at end of file diff --git a/Dockerfile copy b/Dockerfile copy new file mode 100644 index 0000000..9779cd8 --- /dev/null +++ b/Dockerfile copy @@ -0,0 +1,15 @@ +FROM ubuntu:22.04 + +USER root + +RUN apt-get update ;\ + apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common + +RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ + apt-get update ;\ + apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin + +RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ + sudo bash nodesource_setup.sh ;\ + apt-get -y install nodejs diff --git a/Dockerfile copy 2 b/Dockerfile copy 2 new file mode 100644 index 0000000..21b89f3 --- /dev/null +++ b/Dockerfile copy 2 @@ -0,0 +1,12 @@ +FROM node:21-bookworm AS build + +RUN node -v +WORKDIR /app +COPY . . +RUN npm install +RUN npm run build + +FROM nginx +COPY --from=build /app/dist/ /usr/share/nginx/html/ +RUN rm /etc/nginx/conf.d/default.conf +COPY _nginx/nginx.conf /etc/nginx/conf.d \ No newline at end of file diff --git a/Dockerfile.inbound b/Dockerfile.inbound new file mode 100644 index 0000000..d211e44 --- /dev/null +++ b/Dockerfile.inbound @@ -0,0 +1,15 @@ +FROM jenkins/inbound-agent + +USER root + +RUN apt-get update ;\ + apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common + +RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ + apt-get update ;\ + apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin + +RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ + sudo bash nodesource_setup.sh ;\ + apt-get -y install nodejs \ No newline at end of file diff --git a/Dockerfile.test b/Dockerfile.test new file mode 100644 index 0000000..f6deff2 --- /dev/null +++ b/Dockerfile.test @@ -0,0 +1,13 @@ +FROM jenkins/inbound-agent + +USER root +RUN apt-get update ;\ + apt-get -y install npm procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common ;\ + curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg ;\ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" |tee /etc/apt/sources.list.d/docker.list > /dev/null ;\ + apt-get -y update ;\ + apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose + +RUN sudo curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install nodejs -y + +USER jenkins \ No newline at end of file From 725edc0a2483961b99d9f3d1f6bb9696f61240bd Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Tue, 9 Jan 2024 18:28:15 +0100 Subject: [PATCH 05/51] conf docker --- Dockerfile | 19 +++++++++++++++---- Dockerfile.1 | 5 +++++ Dockerfile.inbound | 15 --------------- 3 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 Dockerfile.1 delete mode 100644 Dockerfile.inbound diff --git a/Dockerfile b/Dockerfile index 6eef6bc..90d792b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,16 @@ -FROM node:21-bookworm AS build +FROM jenkins/inbound-agent -RUN node -v -WORKDIR /app -COPY . . \ No newline at end of file +USER root + +RUN apt-get update ;\ + apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common + +RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ + apt-get update ;\ + apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin + +RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ + sudo bash nodesource_setup.sh ;\ + apt-get -y install nodejs +USER jenkins diff --git a/Dockerfile.1 b/Dockerfile.1 new file mode 100644 index 0000000..6eef6bc --- /dev/null +++ b/Dockerfile.1 @@ -0,0 +1,5 @@ +FROM node:21-bookworm AS build + +RUN node -v +WORKDIR /app +COPY . . \ No newline at end of file diff --git a/Dockerfile.inbound b/Dockerfile.inbound deleted file mode 100644 index d211e44..0000000 --- a/Dockerfile.inbound +++ /dev/null @@ -1,15 +0,0 @@ -FROM jenkins/inbound-agent - -USER root - -RUN apt-get update ;\ - apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common - -RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ - apt-get update ;\ - apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin - -RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ - sudo bash nodesource_setup.sh ;\ - apt-get -y install nodejs \ No newline at end of file From 894a7bb2693acbee127005b3ffdc4671c653168e Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 18:18:00 +0100 Subject: [PATCH 06/51] check jenkins --- Dockerfile | 3 +-- Dockerfile copy | 15 --------------- Dockerfile copy 2 | 12 ------------ Dockerfile.1 | 5 ----- Dockerfile.test | 13 ------------- Jenkinsfile | 3 +++ 6 files changed, 4 insertions(+), 47 deletions(-) delete mode 100644 Dockerfile copy delete mode 100644 Dockerfile copy 2 delete mode 100644 Dockerfile.1 delete mode 100644 Dockerfile.test diff --git a/Dockerfile b/Dockerfile index 90d792b..9779cd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM jenkins/inbound-agent +FROM ubuntu:22.04 USER root @@ -13,4 +13,3 @@ RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ sudo bash nodesource_setup.sh ;\ apt-get -y install nodejs -USER jenkins diff --git a/Dockerfile copy b/Dockerfile copy deleted file mode 100644 index 9779cd8..0000000 --- a/Dockerfile copy +++ /dev/null @@ -1,15 +0,0 @@ -FROM ubuntu:22.04 - -USER root - -RUN apt-get update ;\ - apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common - -RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ - apt-get update ;\ - apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin - -RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ - sudo bash nodesource_setup.sh ;\ - apt-get -y install nodejs diff --git a/Dockerfile copy 2 b/Dockerfile copy 2 deleted file mode 100644 index 21b89f3..0000000 --- a/Dockerfile copy 2 +++ /dev/null @@ -1,12 +0,0 @@ -FROM node:21-bookworm AS build - -RUN node -v -WORKDIR /app -COPY . . -RUN npm install -RUN npm run build - -FROM nginx -COPY --from=build /app/dist/ /usr/share/nginx/html/ -RUN rm /etc/nginx/conf.d/default.conf -COPY _nginx/nginx.conf /etc/nginx/conf.d \ No newline at end of file diff --git a/Dockerfile.1 b/Dockerfile.1 deleted file mode 100644 index 6eef6bc..0000000 --- a/Dockerfile.1 +++ /dev/null @@ -1,5 +0,0 @@ -FROM node:21-bookworm AS build - -RUN node -v -WORKDIR /app -COPY . . \ No newline at end of file diff --git a/Dockerfile.test b/Dockerfile.test deleted file mode 100644 index f6deff2..0000000 --- a/Dockerfile.test +++ /dev/null @@ -1,13 +0,0 @@ -FROM jenkins/inbound-agent - -USER root -RUN apt-get update ;\ - apt-get -y install npm procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common ;\ - curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg ;\ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" |tee /etc/apt/sources.list.d/docker.list > /dev/null ;\ - apt-get -y update ;\ - apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose - -RUN sudo curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install nodejs -y - -USER jenkins \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index f1dd160..021c586 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,6 +10,9 @@ pipeline { sh ''' sudo npm install sudo npm run build + sudo echo "-------------------------------------------" + sudo date + sudo echo "-------------------------------------------" #sudo docker build -t bbuddy/bbuddy_backend-dev:latest . ''' } From 9a3a162c93bda011ec36cc5b3201afba419374b0 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 18:19:42 +0100 Subject: [PATCH 07/51] test --- Jenkinsfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 021c586..d4e875b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,11 +8,9 @@ pipeline { stage('Build static content') { steps { sh ''' - sudo npm install - sudo npm run build - sudo echo "-------------------------------------------" - sudo date - sudo echo "-------------------------------------------" + echo "test" + #sudo npm install + #sudo npm run build #sudo docker build -t bbuddy/bbuddy_backend-dev:latest . ''' } From 5524a430e26f4d3b6b35b64e396d0b91077ed5ff Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 18:20:25 +0100 Subject: [PATCH 08/51] test --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d4e875b..96a7cfe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,8 +8,7 @@ pipeline { stage('Build static content') { steps { sh ''' - echo "test" - #sudo npm install + sudo npm install #sudo npm run build #sudo docker build -t bbuddy/bbuddy_backend-dev:latest . ''' From c47d16bccc5b7b9f39b457b24722c288b22d65da Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 18:21:46 +0100 Subject: [PATCH 09/51] fix jenkins --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 96a7cfe..6e8d7b1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,8 +8,8 @@ pipeline { stage('Build static content') { steps { sh ''' - sudo npm install - #sudo npm run build + npm install + npm run build #sudo docker build -t bbuddy/bbuddy_backend-dev:latest . ''' } From 9ec15676051a3b6ce5cf872a5c5fe54a582d4b96 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 18:27:18 +0100 Subject: [PATCH 10/51] test --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 6e8d7b1..5add8e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,6 +10,7 @@ pipeline { sh ''' npm install npm run build + echo "-----" #sudo docker build -t bbuddy/bbuddy_backend-dev:latest . ''' } From 8a6b6679e6cc738b9a9a029b123185ffd40d04b5 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 18:30:21 +0100 Subject: [PATCH 11/51] test --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5add8e1..9e419b1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { sh ''' npm install npm run build - echo "-----" + echo "-------" #sudo docker build -t bbuddy/bbuddy_backend-dev:latest . ''' } From f1cc366f11774b64bdfbb6a79300927cbef1aea9 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 18:46:39 +0100 Subject: [PATCH 12/51] add push to jenkinsfile --- Dockerfile | 23 ++++++++++++----------- Dockerfile copy | 31 +++++++++++++++++++++++++++++++ Jenkinsfile | 10 ++++------ 3 files changed, 47 insertions(+), 17 deletions(-) create mode 100644 Dockerfile copy diff --git a/Dockerfile b/Dockerfile index 9779cd8..d27c94f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ -FROM ubuntu:22.04 +FROM node:20-bullseye AS build -USER root +RUN node -v + +# make the 'app' folder the current working directory +WORKDIR /app + +COPY . . +FROM nginx +COPY --from=build /app/build/ /usr/share/nginx/html/ + +RUN rm /etc/nginx/conf.d/default.conf +COPY _nginx/nginx.conf /etc/nginx/conf.d -RUN apt-get update ;\ - apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common -RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ - apt-get update ;\ - apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin -RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ - sudo bash nodesource_setup.sh ;\ - apt-get -y install nodejs diff --git a/Dockerfile copy b/Dockerfile copy new file mode 100644 index 0000000..65863ba --- /dev/null +++ b/Dockerfile copy @@ -0,0 +1,31 @@ +FROM node:20-bullseye AS build + +RUN node -v + +# make the 'app' folder the current working directory +WORKDIR /app + +COPY . . +FROM nginx +COPY --from=build /app/build/ /usr/share/nginx/html/ + +RUN rm /etc/nginx/conf.d/default.conf +COPY _nginx/nginx.conf /etc/nginx/conf.d + + + +FROM ubuntu:22.04 + +USER root + +RUN apt-get update ;\ + apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common + +RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ + apt-get update ;\ + apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin + +RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ + sudo bash nodesource_setup.sh ;\ + apt-get -y install nodejs diff --git a/Jenkinsfile b/Jenkinsfile index 9e419b1..26be5ea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,18 +10,16 @@ pipeline { sh ''' npm install npm run build - echo "-------" - #sudo docker build -t bbuddy/bbuddy_backend-dev:latest . + sudo docker build -t bbuddy/bbuddy_ui:latest . ''' } } stage('Push image to harbor ') { steps { sh ''' - # - #sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz' - #sudo docker tag bbuddy/bbuddy_backend-dev:1.0.0 harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy-ui:latest - #sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy-ui:latest + sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz' + sudo docker tag bbuddy/bbuddy_ui:latest harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest + sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy-ui:latest ''' } From 32a55b5e369b4502a883b8fa35353d48d48ca48b Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 18:49:24 +0100 Subject: [PATCH 13/51] fix jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 26be5ea..2793b4e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { sh ''' npm install npm run build - sudo docker build -t bbuddy/bbuddy_ui:latest . + docker build -t bbuddy/bbuddy_ui:latest . ''' } } From f7bcc243b7032f666a67bb8122460b8adae4d150 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 18:54:53 +0100 Subject: [PATCH 14/51] . --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 2793b4e..5a0d225 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,6 +10,7 @@ pipeline { sh ''' npm install npm run build + echo docker build -t bbuddy/bbuddy_ui:latest . ''' } From 2b00d2b167f634de7adaf9faa8f47e9cafe24c04 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 18:55:50 +0100 Subject: [PATCH 15/51] . --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5a0d225..2ea3efa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { sh ''' sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz' sudo docker tag bbuddy/bbuddy_ui:latest harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest - sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy-ui:latest + sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest ''' } From 43f25622ea3b656fda20250b607e6a7b9de168d9 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 19:02:11 +0100 Subject: [PATCH 16/51] dockerfile tune --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d27c94f..d2f3b73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,12 @@ FROM node:20-bullseye AS build RUN node -v # make the 'app' folder the current working directory -WORKDIR /app +WORKDIR bbuddy_ui_master COPY . . + FROM nginx -COPY --from=build /app/build/ /usr/share/nginx/html/ +COPY --from=build bbuddy_ui_master/dist/ /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf COPY _nginx/nginx.conf /etc/nginx/conf.d From b2d14f85708195daad4066c92de978cfd86fb6fa Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 22:37:00 +0100 Subject: [PATCH 17/51] debug Dockerfile --- Dockerfile | 17 +++++++++-------- Dockerfile copy | 31 ------------------------------- 2 files changed, 9 insertions(+), 39 deletions(-) delete mode 100644 Dockerfile copy diff --git a/Dockerfile b/Dockerfile index d2f3b73..9c26bc8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,18 @@ -FROM node:20-bullseye AS build +FROM debian:bookworm AS build RUN node -v # make the 'app' folder the current working directory -WORKDIR bbuddy_ui_master +CMD [ "pwd" ] +WORKDIR /app +CMD ['pwd'] +#COPY dist -COPY . . +#FROM nginx +#COPY --from=build dist/ /usr/share/nginx/html/ -FROM nginx -COPY --from=build bbuddy_ui_master/dist/ /usr/share/nginx/html/ - -RUN rm /etc/nginx/conf.d/default.conf -COPY _nginx/nginx.conf /etc/nginx/conf.d +#RUN rm /etc/nginx/conf.d/default.conf +#COPY _nginx/nginx.conf /etc/nginx/conf.d diff --git a/Dockerfile copy b/Dockerfile copy deleted file mode 100644 index 65863ba..0000000 --- a/Dockerfile copy +++ /dev/null @@ -1,31 +0,0 @@ -FROM node:20-bullseye AS build - -RUN node -v - -# make the 'app' folder the current working directory -WORKDIR /app - -COPY . . -FROM nginx -COPY --from=build /app/build/ /usr/share/nginx/html/ - -RUN rm /etc/nginx/conf.d/default.conf -COPY _nginx/nginx.conf /etc/nginx/conf.d - - - -FROM ubuntu:22.04 - -USER root - -RUN apt-get update ;\ - apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common - -RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ - apt-get update ;\ - apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin - -RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ - sudo bash nodesource_setup.sh ;\ - apt-get -y install nodejs From 3822ce1f7b8bb86df000b8f4ab385fdc32f27a29 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 22:39:56 +0100 Subject: [PATCH 18/51] chvers dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9c26bc8..327d7f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bookworm AS build +FROM node:bookworm AS build RUN node -v From 315ad2d5bdc03c9438cbc336c63ff7451f990137 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 22:47:25 +0100 Subject: [PATCH 19/51] test --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 327d7f4..00bf8a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,8 @@ WORKDIR /app CMD ['pwd'] #COPY dist -#FROM nginx -#COPY --from=build dist/ /usr/share/nginx/html/ +FROM nginx +COPY --from=build dist/ /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf #COPY _nginx/nginx.conf /etc/nginx/conf.d From 505d97d68a3a5727f10f757c7c7c3b6a17700c0e Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 22:50:43 +0100 Subject: [PATCH 20/51] copy Dockerfile --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 00bf8a9..8049cd3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,11 @@ FROM node:bookworm AS build RUN node -v # make the 'app' folder the current working directory -CMD [ "pwd" ] -WORKDIR /app -CMD ['pwd'] +WORKDIR /dist #COPY dist FROM nginx -COPY --from=build dist/ /usr/share/nginx/html/ +COPY --from=build . /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf #COPY _nginx/nginx.conf /etc/nginx/conf.d From a090ad705eb9da0246524780bc74241f413fef73 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 22:56:49 +0100 Subject: [PATCH 21/51] disable push jenkins --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2ea3efa..0889c84 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,9 +18,9 @@ pipeline { stage('Push image to harbor ') { steps { sh ''' - sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz' - sudo docker tag bbuddy/bbuddy_ui:latest harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest - sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest + #sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz' + #sudo docker tag bbuddy/bbuddy_ui:latest harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest + #sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest ''' } From b3573a6a3188c471d884f2b1231cdb1bf0e7296d Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 22:57:57 +0100 Subject: [PATCH 22/51] debug dockerfile --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8049cd3..17169b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,10 @@ RUN node -v # make the 'app' folder the current working directory WORKDIR /dist -#COPY dist - +COPY . . +CMD [ "pwd" ] FROM nginx +CMD [ "pwd" ] COPY --from=build . /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf From d03f7074b3155923517b431e58c65100e5a81c11 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 22:59:33 +0100 Subject: [PATCH 23/51] debug dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 17169b5..bcbc198 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ RUN node -v # make the 'app' folder the current working directory WORKDIR /dist COPY . . -CMD [ "pwd" ] +RUN echo "$PWD" FROM nginx -CMD [ "pwd" ] +RUN echo "$PWD" COPY --from=build . /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf From f994ec5cd0422ae9f075fb291abf11159eb0b1a6 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:02:39 +0100 Subject: [PATCH 24/51] deb jenk --- Jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0889c84..3611238 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,9 +8,11 @@ pipeline { stage('Build static content') { steps { sh ''' - npm install - npm run build - echo + #npm install + #npm run build + echo "------" + pwd + echo "------" docker build -t bbuddy/bbuddy_ui:latest . ''' } From 76cf530ddfa1ca089cde3274c344e6b9d7f866ab Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:04:01 +0100 Subject: [PATCH 25/51] . --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index bcbc198..02e1602 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,10 +8,8 @@ COPY . . RUN echo "$PWD" FROM nginx RUN echo "$PWD" +RUN echo "$LS" COPY --from=build . /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf #COPY _nginx/nginx.conf /etc/nginx/conf.d - - - From ea251ef43dc4aa771c95b5cb64f2ef1e7e6566ff Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:06:59 +0100 Subject: [PATCH 26/51] . --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 02e1602..bb4f41d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,10 @@ RUN node -v # make the 'app' folder the current working directory WORKDIR /dist COPY . . -RUN echo "$PWD" +RUN pwd FROM nginx -RUN echo "$PWD" -RUN echo "$LS" +RUN pwd +RUN ls COPY --from=build . /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf From 0e46c6b65b488d18c7dffcf7d0633a8b291bdad0 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:16:46 +0100 Subject: [PATCH 27/51] . --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index bb4f41d..0f92487 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,8 @@ RUN node -v WORKDIR /dist COPY . . RUN pwd +RUN ls + FROM nginx RUN pwd RUN ls From 217fabae7d56f3715b8f1bc80bd3dc1c74586524 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:18:48 +0100 Subject: [PATCH 28/51] . --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0f92487..c9d5beb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,23 @@ FROM node:bookworm AS build RUN node -v # make the 'app' folder the current working directory + +RUN echo "----------------------------" +RUN pwd +RUN ls +RUN echo "----------------------------" WORKDIR /dist COPY . . +RUN echo "----------------------------" RUN pwd RUN ls +RUN echo "----------------------------" FROM nginx +RUN echo "----------------------------" RUN pwd RUN ls +RUN echo "----------------------------" COPY --from=build . /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf From 90476a86730d420c83ca273dd3c463215818f769 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:20:15 +0100 Subject: [PATCH 29/51] . --- Dockerfile | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index c9d5beb..9f2980d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,23 +4,17 @@ RUN node -v # make the 'app' folder the current working directory -RUN echo "----------------------------" RUN pwd RUN ls -RUN echo "----------------------------" -WORKDIR /dist +#WORKDIR /dist COPY . . -RUN echo "----------------------------" -RUN pwd -RUN ls -RUN echo "----------------------------" -FROM nginx -RUN echo "----------------------------" -RUN pwd -RUN ls -RUN echo "----------------------------" -COPY --from=build . /usr/share/nginx/html/ +#FROM nginx +#RUN echo "----------------------------" +#RUN pwd +#RUN ls +#RUN echo "----------------------------" +#COPY --from=build . /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf #COPY _nginx/nginx.conf /etc/nginx/conf.d From 5c12f4fe4beae3a2a9e6a779eab25d3d6757e0bb Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:20:59 +0100 Subject: [PATCH 30/51] . --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 9f2980d..52021ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ RUN ls #WORKDIR /dist COPY . . + #FROM nginx #RUN echo "----------------------------" #RUN pwd From 4eef7c6b2986c18f1584979fa8e73fc20501b9df Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:22:51 +0100 Subject: [PATCH 31/51] . --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 52021ce..813c1b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,11 @@ RUN node -v RUN pwd RUN ls -#WORKDIR /dist -COPY . . +WORKDIR /dist +RUN pwd +RUN ls + +#COPY . . #FROM nginx From 7853ba26859a4e4b4515675b90c04c6ab7705686 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:25:11 +0100 Subject: [PATCH 32/51] . --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 813c1b5..11c6509 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ RUN ls WORKDIR /dist RUN pwd RUN ls - #COPY . . From 662c6e3500cd9add82b96e2c778750f7240f43ee Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:53:46 +0100 Subject: [PATCH 33/51] . --- Dockerfile | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 11c6509..0322934 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,22 +2,12 @@ FROM node:bookworm AS build RUN node -v -# make the 'app' folder the current working directory - -RUN pwd -RUN ls -WORKDIR /dist -RUN pwd -RUN ls -#COPY . . +WORKDIR /app +COPY . . -#FROM nginx -#RUN echo "----------------------------" -#RUN pwd -#RUN ls -#RUN echo "----------------------------" -#COPY --from=build . /usr/share/nginx/html/ +FROM nginx +COPY --from=build dist/ /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf #COPY _nginx/nginx.conf /etc/nginx/conf.d From 1c167398a1309a11a4c28392e7497b02d587d4e2 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:54:54 +0100 Subject: [PATCH 34/51] . --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 0322934..26f1e3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ COPY . . FROM nginx +RUN ls COPY --from=build dist/ /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf From 2e884a3b90c913f00573edc4cd984fd818f12914 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Wed, 10 Jan 2024 23:59:28 +0100 Subject: [PATCH 35/51] . --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 26f1e3f..51861d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ COPY . . FROM nginx RUN ls -COPY --from=build dist/ /usr/share/nginx/html/ +#COPY --from=build . /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf #COPY _nginx/nginx.conf /etc/nginx/conf.d From 14b1799f2041bd48dd2118a1aaba86f182617d3c Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 00:01:08 +0100 Subject: [PATCH 36/51] . --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3611238..24c416a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { echo "------" pwd echo "------" - docker build -t bbuddy/bbuddy_ui:latest . + docker build --progress=plain -t bbuddy/bbuddy_ui:latest . ''' } } From 8f0b3b9cc427233e4319104af01242a8069fef84 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 00:02:11 +0100 Subject: [PATCH 37/51] . --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 51861d4..0b5621a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,9 @@ COPY . . FROM nginx RUN ls +RUN ls +RUN ls +RUN ls #COPY --from=build . /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf From b4fdeaff5a8cde15ccdb048e940c2f73dd7fca6b Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 00:03:29 +0100 Subject: [PATCH 38/51] . --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0b5621a..5eeac37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,7 @@ COPY . . FROM nginx RUN ls RUN ls -RUN ls -RUN ls -#COPY --from=build . /usr/share/nginx/html/ - +COPY --from=build . /usr/share/nginx/html/ +RUN ls /usr/share/nginx/html/ #RUN rm /etc/nginx/conf.d/default.conf #COPY _nginx/nginx.conf /etc/nginx/conf.d From 62edbd20c591de962e06a424b52924082b932e7b Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 00:15:38 +0100 Subject: [PATCH 39/51] nginx conf --- Dockerfile | 10 +++------- _nginx/nginx.conf | 11 +++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 _nginx/nginx.conf diff --git a/Dockerfile b/Dockerfile index 5eeac37..8026386 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,7 @@ RUN node -v WORKDIR /app COPY . . - FROM nginx -RUN ls -RUN ls -COPY --from=build . /usr/share/nginx/html/ -RUN ls /usr/share/nginx/html/ -#RUN rm /etc/nginx/conf.d/default.conf -#COPY _nginx/nginx.conf /etc/nginx/conf.d +COPY --from=build /app /usr/share/nginx/html/ +RUN rm /etc/nginx/conf.d/default.conf +COPY _nginx/nginx.conf /etc/nginx/conf.d diff --git a/_nginx/nginx.conf b/_nginx/nginx.conf new file mode 100644 index 0000000..4509e7a --- /dev/null +++ b/_nginx/nginx.conf @@ -0,0 +1,11 @@ +server { + listen 80; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; } + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} \ No newline at end of file From c6b6638b8a60dbe670e9644231344064141a179c Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 00:17:45 +0100 Subject: [PATCH 40/51] jenkinsfile clean --- Jenkinsfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 24c416a..65754ad 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,11 +8,9 @@ pipeline { stage('Build static content') { steps { sh ''' - #npm install - #npm run build - echo "------" + npm install + npm run build pwd - echo "------" docker build --progress=plain -t bbuddy/bbuddy_ui:latest . ''' } @@ -20,9 +18,9 @@ pipeline { stage('Push image to harbor ') { steps { sh ''' - #sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz' - #sudo docker tag bbuddy/bbuddy_ui:latest harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest - #sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest + sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz' + sudo docker tag bbuddy/bbuddy_ui:latest harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest + sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest ''' } From 5b196c2ba2eb880e8630247d4d4b02ca1da9266a Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 00:20:17 +0100 Subject: [PATCH 41/51] . --- Dockerfile | 1 - Jenkinsfile | 1 - 2 files changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8026386..21bf9b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ FROM node:bookworm AS build RUN node -v - WORKDIR /app COPY . . diff --git a/Jenkinsfile b/Jenkinsfile index 65754ad..3e99adf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,6 @@ pipeline { sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz' sudo docker tag bbuddy/bbuddy_ui:latest harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest - ''' } } From fb2e5ff8d13f09dabecf86b986139751b7f2b1b6 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 01:10:45 +0100 Subject: [PATCH 42/51] trig --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 21bf9b7..8026386 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM node:bookworm AS build RUN node -v + WORKDIR /app COPY . . From 9715c07626f70b113a1e9d117c15129c92b1ea4c Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 01:30:59 +0100 Subject: [PATCH 43/51] trig --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 8026386..5407eab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ RUN node -v WORKDIR /app COPY . . + FROM nginx COPY --from=build /app /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf From 430cdcb4174f9522c68e00f8736c6035a3a36da3 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 01:37:19 +0100 Subject: [PATCH 44/51] trig. --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5407eab..8026386 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,6 @@ RUN node -v WORKDIR /app COPY . . - FROM nginx COPY --from=build /app /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf From 340ff066e4ced489b1bdbc5250b6203f3bde482d Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 01:39:10 +0100 Subject: [PATCH 45/51] . --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 8026386..5407eab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ RUN node -v WORKDIR /app COPY . . + FROM nginx COPY --from=build /app /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf From 28a5a82ca63c8200e005b904cb439dc029da4fbc Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 01:41:02 +0100 Subject: [PATCH 46/51] . --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 5407eab..e2cbe82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ WORKDIR /app COPY . . + FROM nginx COPY --from=build /app /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf From f5d095222ba7c05085c14085bb66ec208534045b Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 01:42:47 +0100 Subject: [PATCH 47/51] . --- Dockerfile | 3 +-- Jenkinsfile | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e2cbe82..2806cac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,7 @@ WORKDIR /app COPY . . - FROM nginx COPY --from=build /app /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf -COPY _nginx/nginx.conf /etc/nginx/conf.d +COPY _nginx/nginx.conf /etc/nginx/conf.d \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 3e99adf..2c6da33 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,6 +11,7 @@ pipeline { npm install npm run build pwd + echo docker build --progress=plain -t bbuddy/bbuddy_ui:latest . ''' } From 0e8c7845851e17f23c9db5254743f6fd3352bb22 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 02:08:37 +0100 Subject: [PATCH 48/51] dir dockerfile --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2806cac..49fd816 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM node:bookworm AS build - -RUN node -v - -WORKDIR /app -COPY . . +#FROM node:bookworm AS build +#RUN node -v +#WORKDIR /app +#COPY . . FROM nginx -COPY --from=build /app /usr/share/nginx/html/ +WORKDIR /app +COPY . . +COPY --from=build /app/dist /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf COPY _nginx/nginx.conf /etc/nginx/conf.d \ No newline at end of file From 95e1056816ef9060ad97fc2c2862fa05f911fba0 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 02:08:53 +0100 Subject: [PATCH 49/51] . --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 49fd816..8dc2fa6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,6 @@ #FROM node:bookworm AS build #RUN node -v #WORKDIR /app -#COPY . . - - FROM nginx WORKDIR /app COPY . . From 92daa55309c03b81ac116076360b151e8565677a Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 02:09:46 +0100 Subject: [PATCH 50/51] . --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8dc2fa6..b0fa0a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ FROM nginx WORKDIR /app COPY . . -COPY --from=build /app/dist /usr/share/nginx/html/ +#COPY --from=build /app/dist /usr/share/nginx/html/ +COPY /app/dist /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf COPY _nginx/nginx.conf /etc/nginx/conf.d \ No newline at end of file From e1119c4b42743f96f848f28bd7e8547a21effd69 Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 02:13:21 +0100 Subject: [PATCH 51/51] . --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index b0fa0a1..820ce10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,8 @@ -#FROM node:bookworm AS build -#RUN node -v -#WORKDIR /app -FROM nginx +FROM node:bookworm AS build +RUN node -v WORKDIR /app COPY . . -#COPY --from=build /app/dist /usr/share/nginx/html/ -COPY /app/dist /usr/share/nginx/html/ +FROM nginx +COPY --from=build /app/dist /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf COPY _nginx/nginx.conf /etc/nginx/conf.d \ No newline at end of file