Add healthchecks to postgres and pgadmin

This commit is contained in:
Elliot Matson 2022-07-29 16:43:49 -05:00
parent 19f9f58630
commit d395bb4f39

View File

@ -34,6 +34,11 @@ services:
<<: [*db-environment] <<: [*db-environment]
volumes: volumes:
- *db-location - *db-location
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
pgbackups: pgbackups:
image: prodrigestivill/postgres-backup-local:13 image: prodrigestivill/postgres-backup-local:13
restart: always restart: always
@ -55,3 +60,5 @@ services:
<<: [*admin-environment] <<: [*admin-environment]
ports: ports:
- *pgadmin-port - *pgadmin-port
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost/ || exit 1"]