From a24bc6a998b3c528ab07c7bac2a264f82ee59c69 Mon Sep 17 00:00:00 2001 From: Hugo CRENEAU Date: Tue, 4 Mar 2025 09:47:18 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.drone.yml b/.drone.yml index 493d89e..5801bef 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,25 +10,25 @@ steps: - name: docker-build-and-push image: plugins/docker settings: - dockerfile: docker/Dockerfile - context: . + dockerfile: docker/Dockerfile # Le Dockerfile se trouve dans le dossier "docker" + context: . # Contexte de build à la racine pour inclure tous les fichiers registry: hub.codefirst.iut.uca.fr repo: hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo username: from_secret: SECRET_REGISTRY_USERNAME password: from_secret: SECRET_REGISTRY_PASSWORD - no_cache: true # Force une reconstruction complète + no_cache: true - name: deploy-container - image: plugins/docker - privileged: true # Nécessaire pour accéder au socket Docker - environment: - DOCKER_HOST: unix:///var/run/docker.sock - volumes: - - name: docker_sock - path: /var/run/docker.sock # Montage du socket Docker - commands: - - docker rm -f portfoliobutcreneauhugo || true - - docker pull hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo:latest - - docker run -d --name portfoliobutcreneauhugo -p 80:80 hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo:latest \ No newline at end of file + image: appleboy/drone-ssh + settings: + host: your.remote.server.address # Remplace par l'adresse IP ou le nom d'hôte de ton serveur + username: your_ssh_username # Remplace par ton utilisateur SSH + port: 22 # Port SSH (par défaut 22) + password: + from_secret: DEPLOY_SERVER_PASSWORD # Ou utilise une clé privée avec "key" si tu préfères + script: + - docker rm -f portfoliobutcreneauhugo || true + - docker pull hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo:latest + - docker run -d --name portfoliobutcreneauhugo -p 80:80 hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo:latest \ No newline at end of file