Created
January 22, 2022 16:14
-
-
Save Phathdt/7edafcbd8cbf24e473bd35cafa2e995e to your computer and use it in GitHub Desktop.
healthcheck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
db: | |
image: bitnami/postgresql:14.1.0 | |
ports: | |
- '5433:5432' | |
environment: | |
POSTGRESQL_USERNAME: postgres | |
POSTGRESQL_PASSWORD: 123123123 | |
POSTGRESQL_DATABASE: abc | |
healthcheck: | |
test: ["CMD-SHELL", "pg_isready -U postgres"] | |
interval: 5s | |
timeout: 5s | |
retries: 5 | |
backend: | |
build: . | |
environment: | |
PORT: 3000 | |
DATABASE_URL: postgresql://postgres:123123123@db:5432/abc?sslmode=disable | |
depends_on: | |
db: | |
condition: service_healthy | |
ports: | |
- 3000:3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment