Skip to content

Instantly share code, notes, and snippets.

@wshihadeh
Created April 6, 2020 17:19
Show Gist options
  • Save wshihadeh/be53d7a5377571609b4a88552c39f088 to your computer and use it in GitHub Desktop.
Save wshihadeh/be53d7a5377571609b4a88552c39f088 to your computer and use it in GitHub Desktop.
Nginx Zero Down time
version: '3.7'
networks:
nginx:
external: false
services:
# --- NGINX ---
nginx:
image: nginx:latest
ports:
- '8088:80'
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", "service", "nginx", "status"]
networks:
- nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment