docker: make optional ports optional really optional

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-03-20 22:02:15 +01:00
parent d20b97fb24
commit 293ebe5505
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
1 changed files with 8 additions and 0 deletions

View File

@ -14,10 +14,18 @@ services:
ports: ports:
- '{{ geth_port }}:{{ geth_port }}/tcp' - '{{ geth_port }}:{{ geth_port }}/tcp'
- '{{ geth_port }}:{{ geth_port }}/udp' - '{{ geth_port }}:{{ geth_port }}/udp'
{% if geth_metrics_enabled %}
- '{{ geth_metrics_port }}:{{ geth_metrics_port }}/tcp' - '{{ geth_metrics_port }}:{{ geth_metrics_port }}/tcp'
{% endif %}
{% if geth_websocket_enabled %}
- '{{ geth_websocket_addr }}:{{ geth_websocket_port }}:{{ geth_websocket_port }}/tcp' - '{{ geth_websocket_addr }}:{{ geth_websocket_port }}:{{ geth_websocket_port }}/tcp'
{% endif %}
{% if geth_rpc_enabled %}
- '{{ geth_rpc_addr }}:{{ geth_rpc_port }}:{{ geth_rpc_port }}/tcp' - '{{ geth_rpc_addr }}:{{ geth_rpc_port }}:{{ geth_rpc_port }}/tcp'
{% endif %}
{% if geth_authrpc_enabled %}
- '{{ geth_authrpc_addr }}:{{ geth_authrpc_port }}:{{ geth_authrpc_port }}/tcp' - '{{ geth_authrpc_addr }}:{{ geth_authrpc_port }}:{{ geth_authrpc_port }}/tcp'
{% endif %}
labels: labels:
# These are just for documentation # These are just for documentation
org.ethereum.geth.network_name: '{{ geth_network_name }}' org.ethereum.geth.network_name: '{{ geth_network_name }}'