From be5c76b5ab704f208f04fad9538879019c1dce2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sat, 5 Dec 2020 13:29:16 +0100 Subject: [PATCH 1/5] ignore big stuff --- .dockerignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..89df79a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +Dockerfile +node_modules \ No newline at end of file From 628bb83288397a184c6e09187ef7825008af3583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sat, 5 Dec 2020 13:29:43 +0100 Subject: [PATCH 2/5] add dockerfile --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..62046ad --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:latest AS build + +ADD . /app +WORKDIR /app + +RUN npm install && npm run build + +FROM nginx:stable + +COPY --from=build /app/dist /usr/share/nginx/html +ADD nginx-site.conf /etc/nginx/conf.d/default.conf \ No newline at end of file From c885cc184188768a8de50193928ba99e9636c287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sat, 5 Dec 2020 13:30:15 +0100 Subject: [PATCH 3/5] add drone config --- .drone.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..32aa2cf --- /dev/null +++ b/.drone.yml @@ -0,0 +1,25 @@ +kind: pipeline +type: docker +name: default + +steps: + - name: code-analysis + image: aosapps/drone-sonar-plugin + settings: + sonar_host: + from_secret: SONAR_HOST + sonar_token: + from_secret: SONAR_CODE + + - name: kaniko + image: banzaicloud/drone-kaniko + settings: + registry: registry.kmlabz.com + repo: videon/${DRONE_REPO_NAME} + username: + from_secret: DOCKER_USERNAME + password: + from_secret: DOCKER_PASSWORD + tags: + - latest + - ${DRONE_BUILD_NUMBER} \ No newline at end of file From bd945c9c9b3e00e992d14c754a6ea5fd0f56eab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sat, 5 Dec 2020 13:31:27 +0100 Subject: [PATCH 4/5] add ms teams webhook to drone config --- .drone.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 32aa2cf..d9f8ccd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,4 +22,12 @@ steps: from_secret: DOCKER_PASSWORD tags: - latest - - ${DRONE_BUILD_NUMBER} \ No newline at end of file + - ${DRONE_BUILD_NUMBER} + + - name: ms-teams + image: kuperiu/drone-teams + settings: + webhook: + from_secret: TEAMS_WEBHOOK + when: + status: [ failure ] \ No newline at end of file From 18808e4aad62a144b0674b8cd994f53d4625947a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sat, 5 Dec 2020 13:38:45 +0100 Subject: [PATCH 5/5] add nginx config for docker stuff --- nginx-site.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 nginx-site.conf diff --git a/nginx-site.conf b/nginx-site.conf new file mode 100644 index 0000000..c49b489 --- /dev/null +++ b/nginx-site.conf @@ -0,0 +1,12 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +}