Skip to content

Commit

Permalink
fix: re-arrange the patch code
Browse files Browse the repository at this point in the history
  • Loading branch information
hinakhadim committed Jan 13, 2025
1 parent 99a4bdd commit d72eb5e
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions tutormfe/patches/local-docker-compose-dev-services
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
{%- 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 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 All @@ -32,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 %}

0 comments on commit d72eb5e

Please sign in to comment.