Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details

master
Hugo CRENEAU 2 months ago
parent 69fe79c0d7
commit a24bc6a998

@ -10,25 +10,25 @@ steps:
- name: docker-build-and-push - name: docker-build-and-push
image: plugins/docker image: plugins/docker
settings: settings:
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile # Le Dockerfile se trouve dans le dossier "docker"
context: . context: . # Contexte de build à la racine pour inclure tous les fichiers
registry: hub.codefirst.iut.uca.fr registry: hub.codefirst.iut.uca.fr
repo: hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo repo: hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo
username: username:
from_secret: SECRET_REGISTRY_USERNAME from_secret: SECRET_REGISTRY_USERNAME
password: password:
from_secret: SECRET_REGISTRY_PASSWORD from_secret: SECRET_REGISTRY_PASSWORD
no_cache: true # Force une reconstruction complète no_cache: true
- name: deploy-container - name: deploy-container
image: plugins/docker image: appleboy/drone-ssh
privileged: true # Nécessaire pour accéder au socket Docker settings:
environment: host: your.remote.server.address # Remplace par l'adresse IP ou le nom d'hôte de ton serveur
DOCKER_HOST: unix:///var/run/docker.sock username: your_ssh_username # Remplace par ton utilisateur SSH
volumes: port: 22 # Port SSH (par défaut 22)
- name: docker_sock password:
path: /var/run/docker.sock # Montage du socket Docker from_secret: DEPLOY_SERVER_PASSWORD # Ou utilise une clé privée avec "key" si tu préfères
commands: script:
- docker rm -f portfoliobutcreneauhugo || true - docker rm -f portfoliobutcreneauhugo || true
- docker pull hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo:latest - 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 - docker run -d --name portfoliobutcreneauhugo -p 80:80 hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo:latest
Loading…
Cancel
Save