kind: pipeline type: docker name: deploy-postgres services: - name: postgres image: postgres:15 environment: POSTGRES_DB: wikifantasy3 POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: - 5432 steps: - name: verify-postgres image: postgres:15 environment: POSTGRES_DB: wikifantasy3 POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres commands: - echo "Vérification de la connexion à PostgreSQL" - echo "POSTGRES_USER=postgres" - echo "POSTGRES_DB=wikifantasy3" - | until pg_isready -h postgres -p 5432 -U postgres; do echo "PostgreSQL n'est pas encore prêt, nouvelle tentative dans 2s..." sleep 2 done - echo "PostgreSQL est prêt !" - PGPASSWORD="postgres" psql -h postgres -U postgres -d wikifantasy3 -c '\l'