From 30c7cfecc92b69d2e25da0cc1f7b0976c604fc8b Mon Sep 17 00:00:00 2001 From: Julian Foad Date: Wed, 24 Jul 2024 13:53:45 +0100 Subject: [PATCH] don't expose ports unless requested --- templates/docker-compose.yml.j2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index 17cfe25..2ff8316 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -17,8 +17,10 @@ services: links: - mongo - qux-be +{% if qux_fe_host_bind_port %} ports: - - "{{ qux_fe_host_bind_port ~ ':8082' if qux_fe_host_bind_port else '8082' }}" + - "{{ qux_fe_host_bind_port ~ ':8082' }}" +{% endif %} depends_on: - qux-be labels: @@ -54,8 +56,10 @@ services: environment: - QUX_SERVER=http://quant-ux-backend:8080/ - QUX_SERVER_PORT=8086 +{% if qux_ws_host_bind_port %} ports: - - "{{ qux_ws_host_bind_port ~ ':8086' if qux_ws_host_bind_port else '8086' }}" + - "{{ qux_ws_host_bind_port ~ ':8086' }}" +{% endif %} links: - qux-be depends_on: