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.
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: deploy-postgres
|
|
|
|
|
|
|
|
services:
|
|
|
|
- name: postgres
|
|
|
|
image: postgres:15
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: mydatabase
|
|
|
|
POSTGRES_USER: myuser
|
|
|
|
POSTGRES_PASSWORD: mypassword
|
|
|
|
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 -d wikifantasy3; do
|
|
|
|
echo "PostgreSQL n'est pas encore prêt, nouvelle tentative dans 2s..."
|
|
|
|
sleep 2
|
|
|
|
done
|
|
|
|
- echo "PostgreSQL est prêt !"
|
|
|
|
- psql -d wikifantasy3 postgres
|