From 293ebe55053525fb05bfc7c96abe8c090fbdac60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 20 Mar 2023 22:02:15 +0100 Subject: [PATCH] docker: make optional ports optional really optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- templates/docker-compose.yml.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index f244f17..c21585b 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -14,10 +14,18 @@ services: ports: - '{{ geth_port }}:{{ geth_port }}/tcp' - '{{ geth_port }}:{{ geth_port }}/udp' +{% if geth_metrics_enabled %} - '{{ geth_metrics_port }}:{{ geth_metrics_port }}/tcp' +{% endif %} +{% if geth_websocket_enabled %} - '{{ 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' +{% endif %} +{% if geth_authrpc_enabled %} - '{{ geth_authrpc_addr }}:{{ geth_authrpc_port }}:{{ geth_authrpc_port }}/tcp' +{% endif %} labels: # These are just for documentation org.ethereum.geth.network_name: '{{ geth_network_name }}'