Created
April 6, 2020 17:19
-
-
Save wshihadeh/be53d7a5377571609b4a88552c39f088 to your computer and use it in GitHub Desktop.
Nginx Zero Down time
This file contains hidden or 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' | |
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