Resources limitation

This commit is contained in:
caskd 2020-01-21 18:02:30 +01:00
parent ef38ec3e84
commit cbf5323901
No known key found for this signature in database
GPG Key ID: 79DB21404E300A27
1 changed files with 39 additions and 3 deletions

View File

@ -37,7 +37,19 @@ x-global-stop-2: &gt2
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