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:
|
|
|
|
from_secret: POSTGRES_DB
|
|
|
|
POSTGRES_USER:
|
|
|
|
from_secret: POSTGRES_USER
|
|
|
|
POSTGRES_PASSWORD:
|
|
|
|
from_secret: POSTGRES_PASSWORD
|
|
|
|
ports:
|
|
|
|
- 5432
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: verify-postgres
|
|
|
|
image: postgres:15
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB:
|
|
|
|
from_secret: POSTGRES_DB
|
|
|
|
POSTGRES_USER:
|
|
|
|
from_secret: POSTGRES_USER
|
|
|
|
POSTGRES_PASSWORD:
|
|
|
|
from_secret: POSTGRES_PASSWORD
|
|
|
|
commands:
|
|
|
|
- echo "Vérification de la connexion à PostgreSQL"
|
|
|
|
- pg_isready -h postgres -p 5432 -U $POSTGRES_USER
|
|
|
|
- psql -h postgres -U $POSTGRES_USER -d $POSTGRES_DB -c '\l
|