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.

33 lines
852 B

kind: pipeline
type: docker
name: deploy-postgres
services:
- name: postgres
image: postgres:15
environment:
POSTGRES_DB: wikifantasy3
POSTGRES_USER: postgres
POSTGRES_PASSWORD: wikifantasy3
ports:
- 5432
steps:
- name: verify-postgres
image: postgres:15
environment:
POSTGRES_DB: wikifantasy3
POSTGRES_USER: postgres
POSTGRES_PASSWORD: wikifantasy3
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 !"
- psql -h postgres -U postgres -d wikifantasy3 -c '\l'