test deploiement 5
continuous-integration/drone/push Build is failing Details

master
Maxime ROCHER 3 weeks ago
parent 3e36183add
commit 4ebd031064

@ -2,21 +2,13 @@ kind: pipeline
type: docker type: docker
name: deploy-postgres name: deploy-postgres
environment:
POSTGRES_USER: myuser
POSTGRES_DB: mydatabase
POSTGRES_PASSWORD: mypassword
services: services:
- name: postgres - name: postgres
image: postgres:15 image: postgres:15
environment: environment:
POSTGRES_DB: POSTGRES_DB: mydatabase
from_secret: POSTGRES_DB POSTGRES_USER: myuser
POSTGRES_USER: POSTGRES_PASSWORD: mypassword
from_secret: POSTGRES_USER
POSTGRES_PASSWORD:
from_secret: POSTGRES_PASSWORD
ports: ports:
- 5432 - 5432
@ -24,14 +16,13 @@ steps:
- name: verify-postgres - name: verify-postgres
image: postgres:15 image: postgres:15
environment: environment:
POSTGRES_DB: POSTGRES_DB: mydatabase
from_secret: POSTGRES_DB POSTGRES_USER: myuser
POSTGRES_USER: POSTGRES_PASSWORD: mypassword
from_secret: POSTGRES_USER
POSTGRES_PASSWORD:
from_secret: POSTGRES_PASSWORD
commands: commands:
- echo "Vérification de la connexion à PostgreSQL" - echo "Vérification de la connexion à PostgreSQL"
- echo "POSTGRES_USER=${POSTGRES_USER}"
- echo "POSTGRES_DB=${POSTGRES_DB}"
- | - |
until pg_isready -h postgres -p 5432 -U "${POSTGRES_USER}"; do until pg_isready -h postgres -p 5432 -U "${POSTGRES_USER}"; do
echo "PostgreSQL n'est pas encore prêt, nouvelle tentative dans 2s..." echo "PostgreSQL n'est pas encore prêt, nouvelle tentative dans 2s..."

Loading…
Cancel
Save