From 99a4bdded557cb67c773ffaf0421a8f6c53ca029 Mon Sep 17 00:00:00 2001 From: Hina Khadim Date: Sat, 14 Dec 2024 11:10:37 +0500 Subject: [PATCH] fix: render mfe-ports for unmounted mfes when these exist --- .../patches/local-docker-compose-dev-services | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tutormfe/patches/local-docker-compose-dev-services b/tutormfe/patches/local-docker-compose-dev-services index 4d952e50..e90cef79 100644 --- a/tutormfe/patches/local-docker-compose-dev-services +++ b/tutormfe/patches/local-docker-compose-dev-services @@ -1,10 +1,17 @@ +{%- set unmounted_mfes = [] %} +{%- for app_name, app in iter_mfes() %} + {%- if not iter_mounts(MOUNTS, app_name)|list %} + {%- set _ = unmounted_mfes.append((app_name, app)) %} + {%- endif %} +{%- endfor %} +{% if unmounted_mfes|length > 0 %} mfe: - ports: - {%- for app_name, app in iter_mfes() %} - {%- if not iter_mounts(MOUNTS, app_name)|list %} - - {{ app["port"] }}:8002 # {{ app_name }} - {%- endif %} - {%- endfor %} + ports: + {%- for app_name, app in unmounted_mfes %} + - {{ app["port"] }}:8002 # {{ app_name }} + {%- endfor %} +{% endif %} + {%- for app_name, app in iter_mfes() %} {%- set mounts = iter_mounts(MOUNTS, app_name)|list %}