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
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
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
Loading…
Cancel
Save