Skip to content

Commit

Permalink
fix: network detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Morriz committed Dec 9, 2024
1 parent de389d0 commit eac0410
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tpl/docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
{#- The service needs discovery labels when one of its ingress entries has a domain or tls and is not using hostport #}
{#- (hostport services are handled by static routers because of their need to restart anyway for new entrypoints) #}
{%- set needs_discovery = (list(s.ingress | selectattr('domain')) + list(s.ingress | selectattr('tls'))) | length > list(s.ingress | selectattr('domain') | selectattr('hostport')) | length %}
{%- set has_ingress = s.ingress | length > 0 %}
{{ project.name }}-{{ s.host }}:
{%- if s.command %}
command: {{ s.command }}
Expand Down Expand Up @@ -94,7 +95,7 @@ services:
- {{ l }}
{%- endfor %}
{%- endif %}
{%- if s.ingress | length > 0 or p.services | length > 1 %}
{%- if has_ingress or p.services | length > 1 %}
networks:
{%- if p.services | length > 1 %}
- default
Expand Down

0 comments on commit eac0410

Please sign in to comment.