Skip to content

Commit

Permalink
fix: render mfe-ports for unmounted mfes when these exist
Browse files Browse the repository at this point in the history
  • Loading branch information
hinakhadim committed Dec 14, 2024
1 parent ee2355f commit 99a4bdd
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tutormfe/patches/local-docker-compose-dev-services
Original file line number Diff line number Diff line change
@@ -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 %}
Expand Down

0 comments on commit 99a4bdd

Please sign in to comment.