generated from Templates_CodeFirst/templateHtmlCss
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.3 KiB
34 lines
1.3 KiB
kind: pipeline
|
|
type: docker
|
|
name: Deploiement
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- name: docker-build-and-push
|
|
image: plugins/docker
|
|
settings:
|
|
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
|
|
|
|
- name: deploy-container
|
|
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 |