From 6ffdbacd3f3348ba76419a9b1c44b53deb9e8c2a Mon Sep 17 00:00:00 2001 From: Kyllian Chabanon Date: Mon, 8 Apr 2024 00:22:25 +0200 Subject: [PATCH] Ajout du Dockerfile et du drone.yml --- Dockerfile | 11 +++++++++++ drone.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 Dockerfile create mode 100644 drone.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..40919c9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:latest AS build + +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm install +COPY docker ./ +RUN npm run build + +FROM nginx:1.19-alpine +COPY --from=build /app/build /usr/share/nginx/html diff --git a/drone.yml b/drone.yml new file mode 100644 index 0000000..8dbfad4 --- /dev/null +++ b/drone.yml @@ -0,0 +1,28 @@ +kind: pipeline +type: docker +name: Portfolio + +trigger: + event: + - push + +steps: + - name: docker-build-and-push + image: plugins/docker + settings: + dockerfile: docker/Dockerfile + context: . + registry: hub.codefirst.iut.uca.fr + mirror: https://proxy.iut.uca.fr:8443 + repo: hub.codefirst.iut.uca.fr/kyllian.chabanon/portfolio + username: + from_secret: SECRET_REGISTRY_USERNAME + password: + from_secret: SECRET_REGISTRY_PASSWORD + - name: deploy-container + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest + environment: + IMAGENAME: hub.codefirst.iut.uca.fr/kyllian.chabanon/portfolio:latest + CONTAINERNAME: portfolio + COMMAND: create + OVERWRITE: true