From cbf532390176e4f5af781b816e79ab589505ac53 Mon Sep 17 00:00:00 2001 From: caskd Date: Tue, 21 Jan 2020 18:02:30 +0100 Subject: [PATCH] Resources limitation --- base.yml | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/base.yml b/base.yml index 46f2b31..ec7cb77 100644 --- a/base.yml +++ b/base.yml @@ -37,7 +37,19 @@ x-global-stop-2: >2 services: haproxy: image: localhost:5000/haproxy-rx - deploy: *gt2 ## HAProxy really dislikes if it's overlapped + deploy: + mode: global + resources: + limits: + cpus: '0.10' + memory: '50M' + restart_policy: + condition: any + update_config: + parallelism: 2 + delay: 5s + order: stop-first + failure_action: rollback logging: *json-log environment: HOSTNAME: "{{.Node.Hostname}}" @@ -49,7 +61,19 @@ services: varnish: image: localhost:5000/varnish - deploy: *gt2 + deploy: + mode: global + resources: + limits: + cpus: '0.10' + memory: '100M' + restart_policy: + condition: any + update_config: + parallelism: 2 + delay: 5s + order: stop-first + failure_action: rollback logging: *json-log tmpfs: /usr/local/var/varnish networks: @@ -57,7 +81,19 @@ services: hitch: image: zazukoians/hitch - deploy: *gt2 + deploy: + mode: global + resources: + limits: + cpus: '0.50' + memory: '50M' + restart_policy: + condition: any + update_config: + parallelism: 2 + delay: 5s + order: stop-first + failure_action: rollback logging: *json-log secrets: - ssl_master