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.

38 lines
1.2 KiB

4 months ago
kind: pipeline
type: docker
4 months ago
name: Deploiement
4 months ago
trigger:
event:
4 months ago
- push
4 months ago
steps:
4 months ago
- name: Build and Push
4 months ago
image: plugins/docker
settings:
4 months ago
dockerfile: docker/Dockerfile # Le Dockerfile se trouve dans le dossier "docker"
context: . # Le contexte de build est le répertoire racine
4 months ago
registry: hub.codefirst.iut.uca.fr
4 months ago
mirror: https://proxy.iut.uca.fr:8443/
repo: hub.codefirst.iut.uca.fr/wikifantasy/wf-database # Références ajustées pour ton projet
4 months ago
username:
from_secret: SECRET_REGISTRY_USERNAME
password:
from_secret: SECRET_REGISTRY_PASSWORD
4 months ago
4 months ago
- name: Deploy
4 months ago
image: docker:20.10.14 # Image Docker standard
4 months ago
environment:
4 months ago
IMAGENAME: hub.codefirst.iut.uca.fr/wikifantasy/wf-database # Références ajustées
CONTAINERNAME: BD-WIKIFANTASY
4 months ago
POSTGRES_PASSWORD:
4 months ago
from_secret: POSTGRES_PASSWORD
4 months ago
POSTGRES_DB:
4 months ago
from_secret: POSTGRES_DB
4 months ago
POSTGRES_USER:
4 months ago
from_secret: POSTGRES_USER
4 months ago
commands:
- docker stop $CONTAINERNAME || true
- docker rm $CONTAINERNAME || true
- docker run -d --name $CONTAINERNAME -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -e POSTGRES_DB=$POSTGRES_DB -e POSTGRES_USER=$POSTGRES_USER -p 5432:5432 $IMAGENAME