allow enabling websocket API port
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
94d9f1bce1
commit
bd4723548a
|
@ -29,6 +29,10 @@ geth_rpc_port: 8545
|
||||||
geth_rcp_api: 'eth,net,web3,personal,admin'
|
geth_rcp_api: 'eth,net,web3,personal,admin'
|
||||||
# Alternative IPC socket
|
# Alternative IPC socket
|
||||||
geth_ipc_path: '/data/geth.ipc'
|
geth_ipc_path: '/data/geth.ipc'
|
||||||
|
# Web Sockets API
|
||||||
|
geth_websocket_enabled: true
|
||||||
|
geth_websocket_port: '{{ geth_rpc_port + 1 | int }}'
|
||||||
|
geth_websocket_api: 'eth,net,web3,personal,admin'
|
||||||
# useful for linking containers
|
# useful for linking containers
|
||||||
geth_extra_alias: geth
|
geth_extra_alias: geth
|
||||||
geth_aliases:
|
geth_aliases:
|
||||||
|
|
|
@ -45,3 +45,15 @@
|
||||||
type: script
|
type: script
|
||||||
script: '{{ geth_sync_check_script }}'
|
script: '{{ geth_sync_check_script }}'
|
||||||
timeout: '5s'
|
timeout: '5s'
|
||||||
|
- name: '{{ geth_cont_name }}-ws'
|
||||||
|
tags: '{{ geth_consul_tags + ["websocket"] }}'
|
||||||
|
port: '{{ geth_websocket_port }}'
|
||||||
|
address: '{{ geth_consul_rpc_address }}'
|
||||||
|
meta:
|
||||||
|
env: '{{ env }}'
|
||||||
|
stage: '{{ stage }}'
|
||||||
|
checks:
|
||||||
|
- id: '{{ geth_cont_name }}-ws-status'
|
||||||
|
name: 'Geth WebSocket API'
|
||||||
|
type: 'tcp'
|
||||||
|
tcp: 'localhost:{{ geth_websocket_port }}'
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
ports:
|
ports:
|
||||||
- '{{ geth_port }}:{{ geth_port }}/tcp'
|
- '{{ geth_port }}:{{ geth_port }}/tcp'
|
||||||
- '{{ geth_port }}:{{ geth_port }}/udp'
|
- '{{ geth_port }}:{{ geth_port }}/udp'
|
||||||
|
- '{{ geth_websocket_port }}:{{ geth_websocket_port }}/tcp'
|
||||||
- '{{ geth_rpc_addr }}:{{ geth_rpc_port }}:{{ geth_rpc_port }}'
|
- '{{ geth_rpc_addr }}:{{ geth_rpc_port }}:{{ geth_rpc_port }}'
|
||||||
labels:
|
labels:
|
||||||
# These are just for documentation
|
# These are just for documentation
|
||||||
|
@ -65,6 +66,13 @@
|
||||||
--http.api={{ geth_rcp_api }}
|
--http.api={{ geth_rcp_api }}
|
||||||
--ipcpath={{ geth_ipc_path }}
|
--ipcpath={{ geth_ipc_path }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if geth_websocket_enabled %}
|
||||||
|
--ws
|
||||||
|
--ws.addr=0.0.0.0
|
||||||
|
--ws.port={{ geth_websocket_port }}
|
||||||
|
--ws.origins={{ geth_aliases | join(",") }}
|
||||||
|
--ws.api={{ geth_websocket_api }}
|
||||||
|
{% endif %}
|
||||||
volumes:
|
volumes:
|
||||||
- '{{ geth_cont_vol }}/keys:/keys:rw'
|
- '{{ geth_cont_vol }}/keys:/keys:rw'
|
||||||
# WARNING: This assumes /data is mounted, see bootstrap role
|
# WARNING: This assumes /data is mounted, see bootstrap role
|
||||||
|
|
Loading…
Reference in New Issue