Skip to content

Instantly share code, notes, and snippets.

@vigohe
Created August 20, 2018 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vigohe/bb3478858f3ef376884513d1909716ee to your computer and use it in GitHub Desktop.
Save vigohe/bb3478858f3ef376884513d1909716ee to your computer and use it in GitHub Desktop.
graceful stack
# docker stack deploy -c stack.yaml api-soap-validate --with-registry-auth
version: '3.3'
services:
api:
image: segurosfalabella.azurecr.io/java-graceful-shutdown
environment:
- VERSION=1.0.0
networks:
- apps-v2
logging:
driver: fluentd
options:
fluentd-address: "localhost:24224"
tag: api-orquestador-cierre
labels: environment,version,appname
labels:
environment: DEV
version: 1.0.0
appname: java-graceful-shutdown
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/actuator/health"]
interval: 1m30s
timeout: 10s
retries: 3
deploy:
placement:
constraints:
- node.role == worker
replicas: 3
resources:
limits:
memory: 650M
reservations:
memory: 300M
update_config:
parallelism: 1
delay: 30s
restart_policy:
condition: any
delay: 5s
max_attempts: 5
window: 30s
networks:
apps-v2:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment