Resources limitation
This commit is contained in:
parent
ef38ec3e84
commit
cbf5323901
42
base.yml
42
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
|
||||
|
|
Reference in New Issue