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.

27 lines
1.3 KiB

4 months ago
kind: pipeline
type: docker
name: deploy-postgresql
steps:
4 months ago
- name: deploy-container-pgsql
4 months ago
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
4 months ago
environment:
IMAGENAME: postgres:latest # Image pour PostgreSQL
CONTAINERNAME: WF-DATABASE # Nom du container
COMMAND: create # Commande pour créer le container
PRIVATE: true # Container privé pour limiter l'accès
4 months ago
OVERWRITE: true # Empêche d'écraser le container si existant
4 months ago
CODEFIRST_CLIENTDRONE_ENV_PGSQL_ROOT_PASSWORD:
4 months ago
from_secret: db_server # Mot de passe root de PostgreSQL depuis le secret Drone
4 months ago
CODEFIRST_CLIENTDRONE_ENV_PGSQL_USER:
4 months ago
from_secret: db_user # Utilisateur de la base depuis le secret Drone
4 months ago
CODEFIRST_CLIENTDRONE_ENV_PGSQL_PASSWORD:
4 months ago
from_secret: db_password # Mot de passe utilisateur de la base depuis le secret Drone
4 months ago
CODEFIRST_CLIENTDRONE_ENV_PGSQL_DATABASE:
4 months ago
from_secret: db_database # Nom de la base de données depuis le secret Drone
commands:
# Optionnel : Délai pour laisser PostgreSQL démarrer
- sleep 10
# Initialisation de la base de données avec un script SQL sur le serveur distant
4 months ago
- psql -h localhost -U admin -d dbWikiFantasy -f init.sql
4 months ago