diff --git a/tutormfe/patches/local-docker-compose-dev-services b/tutormfe/patches/local-docker-compose-dev-services index 4d952e50..82d648b8 100644 --- a/tutormfe/patches/local-docker-compose-dev-services +++ b/tutormfe/patches/local-docker-compose-dev-services @@ -1,10 +1,4 @@ -mfe: - ports: - {%- for app_name, app in iter_mfes() %} - {%- if not iter_mounts(MOUNTS, app_name)|list %} - - {{ app["port"] }}:8002 # {{ app_name }} - {%- endif %} - {%- endfor %} +{%- set unmounted_mfes = [] %} {%- for app_name, app in iter_mfes() %} {%- set mounts = iter_mounts(MOUNTS, app_name)|list %} @@ -25,5 +19,16 @@ mfe: - lms environment: - "PORT={{ app['port'] }}" +{%- else %} +{%- set unmounted_mfes = unmounted_mfes.append((app_name, app)) %} {%- endif %} {%- endfor %} + + +{% if unmounted_mfes|length > 0 %} +mfe: + ports: + {%- for app_name, app in unmounted_mfes %} + - {{ app["port"] }}:8002 # {{ app_name }} + {%- endfor %} +{% endif %} \ No newline at end of file