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:
|
services:
|
||||||
haproxy:
|
haproxy:
|
||||||
image: localhost:5000/haproxy-rx
|
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
|
logging: *json-log
|
||||||
environment:
|
environment:
|
||||||
HOSTNAME: "{{.Node.Hostname}}"
|
HOSTNAME: "{{.Node.Hostname}}"
|
||||||
|
@ -49,7 +61,19 @@ services:
|
||||||
|
|
||||||
varnish:
|
varnish:
|
||||||
image: localhost:5000/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
|
logging: *json-log
|
||||||
tmpfs: /usr/local/var/varnish
|
tmpfs: /usr/local/var/varnish
|
||||||
networks:
|
networks:
|
||||||
|
@ -57,7 +81,19 @@ services:
|
||||||
|
|
||||||
hitch:
|
hitch:
|
||||||
image: zazukoians/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
|
logging: *json-log
|
||||||
secrets:
|
secrets:
|
||||||
- ssl_master
|
- ssl_master
|
||||||
|
|
Reference in New Issue