Last active
October 16, 2020 08:07
-
-
Save limone-eth/2e27c9d7a47ac9601aa3f3e81d738c27 to your computer and use it in GitHub Desktop.
docker-compose file for Medium article
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.7' | |
services: | |
nodejs: | |
image: localhost:5000/docker-zero-downtime-deployment | |
ports: | |
- "3000:3000" | |
command: node index.js | |
deploy: | |
replicas: 4 | |
update_config: | |
parallelism: 2 | |
order: start-first | |
failure_action: rollback | |
delay: 10s | |
rollback_config: | |
parallelism: 0 | |
order: stop-first | |
restart_policy: | |
condition: any | |
delay: 5s | |
max_attempts: 3 | |
window: 120s | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:3000 || exit 1"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment