test drone :3 miaou^^
continuous-integration/drone/push Build encountered an error Details

master
Maxime ROCHER 4 months ago
parent d8afc16b1c
commit 06695b3daa

@ -12,6 +12,8 @@ services:
from_secret: db_password from_secret: db_password
POSTGRES_DB: POSTGRES_DB:
from_secret: db_database from_secret: db_database
volumes:
- /var/lib/postgresql/data
steps: steps:
- name: wait-for-postgresql - name: wait-for-postgresql
@ -33,10 +35,11 @@ steps:
- psql -h postgresql -U $POSTGRES_USER -d $POSTGRES_DB -c "SELECT 1;" || echo "Failed to connect using 'postgresql', trying localhost..." - psql -h postgresql -U $POSTGRES_USER -d $POSTGRES_DB -c "SELECT 1;" || echo "Failed to connect using 'postgresql', trying localhost..."
# Si cela échoue, essaie de se connecter via localhost # Si cela échoue, essaie de se connecter via localhost
- psql -h localhost -U $POSTGRES_USER -d $POSTGRES_DB -c "SELECT 1;" - psql -h localhost -U $POSTGRES_USER -d $POSTGRES_DB -c "SELECT 1;" || echo "Failed to connect using localhost."
- name: check-postgres-logs - name: check-postgres-logs
image: postgres:13 image: docker:20.10.14
privileged: true
commands: commands:
# Commande pour afficher les logs du conteneur PostgreSQL # Commande pour afficher les logs du conteneur PostgreSQL
- docker logs postgresql || echo "Failed to retrieve PostgreSQL logs." - docker logs postgresql || echo "Failed to retrieve PostgreSQL logs."

Loading…
Cancel
Save