mirror of
https://github.com/status-im/infra-role-geth.git
synced 2025-01-09 11:45:50 +00:00
swap limits are not supported by docker-compose
https://stackoverflow.com/questions/44325949/ Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
18382d60d1
commit
c67fc0ef6c
@ -107,7 +107,6 @@ geth_cache_size: ~
|
||||
# Container memory limits
|
||||
geth_cont_mem_ratio: 0.6
|
||||
geth_cont_mem_limit: '{{ (ansible_memtotal_mb * geth_cont_mem_ratio|float) | int }}'
|
||||
geth_cont_swap_limit: '{{ (geth_cont_mem_limit|int) + (ansible_swaptotal_mb * geth_cont_mem_ratio|float) | int }}'
|
||||
|
||||
# general container management
|
||||
compose_recreate: 'smart'
|
||||
|
@ -6,8 +6,10 @@ services:
|
||||
image: '{{ geth_cont_image }}'
|
||||
user: root
|
||||
restart: 'always'
|
||||
mem_limit: '{{ geth_cont_mem_limit }}m'
|
||||
memswap_limit: '{{ geth_cont_swap_limit }}m'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: '{{ geth_cont_mem_limit }}m'
|
||||
ports:
|
||||
- '{{ geth_port }}:{{ geth_port }}/tcp'
|
||||
- '{{ geth_port }}:{{ geth_port }}/udp'
|
||||
|
Loading…
x
Reference in New Issue
Block a user