Skip to content

Instantly share code, notes, and snippets.

@limone-eth
Last active October 16, 2020 08:07
Show Gist options
  • Save limone-eth/2e27c9d7a47ac9601aa3f3e81d738c27 to your computer and use it in GitHub Desktop.
Save limone-eth/2e27c9d7a47ac9601aa3f3e81d738c27 to your computer and use it in GitHub Desktop.
docker-compose file for Medium article
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