Created
January 12, 2017 23:48
-
-
Save sjpuas/0fdfc6b23521bf0111fe19ab3d58b527 to your computer and use it in GitHub Desktop.
docker-compose v2.1 healthcheck and service_healthy
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: '2.1' | |
services: | |
web: | |
image: nginx:alpine | |
depends_on: | |
db: | |
condition: service_healthy | |
db: | |
image: redis:alpine | |
healthcheck: | |
test: ["CMD", "redis-cli","ping"] | |
interval: 30s | |
timeout: 10s | |
retries: 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment