1
0
Fork 0

when binding to local ports, don't also route via traefik-docker labels

This commit is contained in:
Julian Foad 2024-10-18 16:23:52 +01:00
parent 30c7cfecc9
commit b86a3a7a5a

View file

@ -20,13 +20,16 @@ services:
{% if qux_fe_host_bind_port %} {% if qux_fe_host_bind_port %}
ports: ports:
- "{{ qux_fe_host_bind_port ~ ':8082' }}" - "{{ qux_fe_host_bind_port ~ ':8082' }}"
{% endif %} {% else %}
depends_on: expose:
- qux-be - "8082"
labels: labels:
traefik.enable: "true" traefik.enable: "true"
traefik.http.routers.qux-fe.entryPoints: "web_https" traefik.http.routers.qux-fe.entryPoints: "web_https"
traefik.http.routers.qux-fe.rule: "Host(`{{ qux_domain }}`)" traefik.http.routers.qux-fe.rule: "Host(`{{ qux_domain }}`)"
{% endif %}
depends_on:
- qux-be
qux-be: qux-be:
restart: always restart: always
container_name: quant-ux-backend container_name: quant-ux-backend
@ -59,15 +62,18 @@ services:
{% if qux_ws_host_bind_port %} {% if qux_ws_host_bind_port %}
ports: ports:
- "{{ qux_ws_host_bind_port ~ ':8086' }}" - "{{ qux_ws_host_bind_port ~ ':8086' }}"
{% else %}
expose:
- "8086"
labels:
traefik.enable: "true"
traefik.http.routers.qux-ws.entryPoints: "web_https"
traefik.http.routers.qux-ws.rule: "Host(`ws.{{ qux_domain }}`)"
{% endif %} {% endif %}
links: links:
- qux-be - qux-be
depends_on: depends_on:
- qux-be - qux-be
labels:
traefik.enable: "true"
traefik.http.routers.qux-ws.entryPoints: "web_https"
traefik.http.routers.qux-ws.rule: "Host(`ws.{{ qux_domain }}`)"
networks: networks:
default: default: