add restart_policy section to docker compose
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
eb798800c7
commit
a85f7e906b
|
@ -25,6 +25,12 @@ beacon_node_mem_limit: '{{ (ansible_memtotal_mb * 0.6) | int }}'
|
||||||
beacon_node_cpu_reserve: 0.20
|
beacon_node_cpu_reserve: 0.20
|
||||||
beacon_node_mem_reserve: '{{ (ansible_memtotal_mb * 0.2) | int }}'
|
beacon_node_mem_reserve: '{{ (ansible_memtotal_mb * 0.2) | int }}'
|
||||||
|
|
||||||
|
# container restart policy
|
||||||
|
beacon_node_restart_ondition: 'on-failure'
|
||||||
|
beacon_node_restart_max_attempts: 3
|
||||||
|
beacon_node_restart_delay_sec: 10
|
||||||
|
beacon_node_restart_window_sec: 120
|
||||||
|
|
||||||
# general container management
|
# general container management
|
||||||
compose_state: 'present'
|
compose_state: 'present'
|
||||||
compose_recreate: 'smart'
|
compose_recreate: 'smart'
|
||||||
|
|
|
@ -23,6 +23,11 @@
|
||||||
reservations:
|
reservations:
|
||||||
cpus: '{{ beacon_node_cpu_reserve | string }}'
|
cpus: '{{ beacon_node_cpu_reserve | string }}'
|
||||||
memory: '{{ beacon_node_mem_reserve }}M'
|
memory: '{{ beacon_node_mem_reserve }}M'
|
||||||
|
restart_policy:
|
||||||
|
condition: '{{ beacon_node_restart_ondition }}'
|
||||||
|
max_attempts: '{{ beacon_node_restart_max_attempts }}'
|
||||||
|
delay: '{{ beacon_node_restart_delay_sec }}s'
|
||||||
|
window: '{{ beacon_node_restart_window_sec }}s'
|
||||||
ports:
|
ports:
|
||||||
- '127.0.0.1:{{ beacon_node_rpc_port }}:{{ beacon_node_rpc_port }}/tcp'
|
- '127.0.0.1:{{ beacon_node_rpc_port }}:{{ beacon_node_rpc_port }}/tcp'
|
||||||
- '{{ beacon_node_metrics_port }}:{{ beacon_node_metrics_port }}/tcp'
|
- '{{ beacon_node_metrics_port }}:{{ beacon_node_metrics_port }}/tcp'
|
||||||
|
|
Loading…
Reference in New Issue