@@ -53,10 +53,10 @@ services:
5353 - traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.path=/
5454 - traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.interval=2000ms
5555 - traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.timeout=1000ms
56- - traefik.http.routers.${SWARM_STACK_NAME}_api-server.rule=(Path(`/ `) || Path(`/v0`) || PathPrefix(`/v0/`) || Path(`/api/v0/openapi.json`))
56+ - traefik.http.routers.${SWARM_STACK_NAME}_api-server.rule=hostregexp(`{host:.+} `) && ( Path(`/`, `/v0`) || PathPrefix(`/v0/`) || Path(`/api/v0/openapi.json`))
5757 - traefik.http.routers.${SWARM_STACK_NAME}_api-server.entrypoints=simcore_api
5858 - traefik.http.routers.${SWARM_STACK_NAME}_api-server.priority=1
59- - traefik.http.routers.${SWARM_STACK_NAME}_api-server.middlewares=${SWARM_STACK_NAME}_gzip@swarm ,ratelimit-${SWARM_STACK_NAME}_api-server,inflightreq-${SWARM_STACK_NAME}_api-server
59+ - traefik.http.routers.${SWARM_STACK_NAME}_api-server.middlewares=${SWARM_STACK_NAME}_gzip@docker ,ratelimit-${SWARM_STACK_NAME}_api-server,inflightreq-${SWARM_STACK_NAME}_api-server
6060 networks :
6161 - default
6262
@@ -517,16 +517,16 @@ services:
517517 - traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.interval=2000ms
518518 - traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.timeout=1000ms
519519 - traefik.http.middlewares.${SWARM_STACK_NAME}_static_webserver_retry.retry.attempts=2
520- - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=(Path(`/osparc `) || Path(`/s4l`) || Path( `/s4llite`) || Path( `/s4lacad`) || Path( `/s4lengine`) || Path( `/s4ldesktop`) || Path( `/s4ldesktopacad`) || Path( `/tis`) || Path( `/transpiled`) || Path( `/resource`) || PathPrefix(`/osparc/`) || PathPrefix( `/s4l/`) || PathPrefix( `/s4llite/`) || PathPrefix( `/s4lacad/`) || PathPrefix( `/s4lengine/`) || PathPrefix( `/s4ldesktop/`) || PathPrefix( `/s4ldesktopacad/`) || PathPrefix( `/tis/`) || PathPrefix( `/transpiled/`) || PathPrefix( `/resource/`))
520+ - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=hostregexp(`{host:.+} `) && ( Path(`/osparc`,`/ s4l`, `/s4llite`, `/s4lacad`, `/s4lengine`, `/s4ldesktop`, `/s4ldesktopacad`, `/tis`, `/transpiled`, `/resource`) || PathPrefix(`/osparc/`, `/s4l/`, `/s4llite/`, `/s4lacad/`, `/s4lengine/`, `/s4ldesktop/`, `/s4ldesktopacad/`, `/tis/`, `/transpiled/`, `/resource/`))
521521 - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.service=${SWARM_STACK_NAME}_static_webserver
522522 - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.entrypoints=http
523523 - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.priority=2
524- - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.middlewares=${SWARM_STACK_NAME}_gzip@swarm ,${SWARM_STACK_NAME}_static_webserver_retry
524+ - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.middlewares=${SWARM_STACK_NAME}_gzip@docker ,${SWARM_STACK_NAME}_static_webserver_retry
525525 # catchall for legacy services (this happens if a backend disappears and a frontend tries to reconnect, the right return value is a 503)
526526 - traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.service=${SWARM_STACK_NAME}_legacy_services_catchall
527527 - traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.priority=1
528528 - traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.entrypoints=http
529- - traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.rule=(Path(`/x/{node_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}`) || PathPrefix(`/x/{node_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}/`))
529+ - traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.rule=hostregexp(`{host:.+}`) && (Path(`/x/{node_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}`) || PathPrefix(`/x/{node_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}/`))
530530 # this tricks traefik into a 502 (bad gateway) since the service does not exist on this port
531531 - traefik.http.services.${SWARM_STACK_NAME}_legacy_services_catchall.loadbalancer.server.port=0
532532 # this tricks traefik into returning a 503 (service unavailable) since the healthcheck will always return false
@@ -746,10 +746,10 @@ services:
746746 - traefik.http.services.${SWARM_STACK_NAME}_webserver.loadbalancer.sticky.cookie.secure=true
747747 - traefik.http.middlewares.${SWARM_STACK_NAME}_webserver_retry.retry.attempts=2
748748 - traefik.http.routers.${SWARM_STACK_NAME}_webserver.service=${SWARM_STACK_NAME}_webserver
749- - traefik.http.routers.${SWARM_STACK_NAME}_webserver.rule=(Path(`/ `) || Path(`/v0`) || Path(`/ socket.io/`) || Path( `/static-frontend-data.json`) || Path( `/study/{study_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}`) || Path( `/view`) || Path( `/#/view`) || Path( `/#/error`) || PathPrefix(`/v0/`))
749+ - traefik.http.routers.${SWARM_STACK_NAME}_webserver.rule=hostregexp(`{host:.+} `) && ( Path(`/`, `/v0`,`/ socket.io/`, `/static-frontend-data.json`, `/study/{study_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}`, `/view`, `/#/view`, `/#/error`) || PathPrefix(`/v0/`))
750750 - traefik.http.routers.${SWARM_STACK_NAME}_webserver.entrypoints=http
751751 - traefik.http.routers.${SWARM_STACK_NAME}_webserver.priority=2
752- - traefik.http.routers.${SWARM_STACK_NAME}_webserver.middlewares=${SWARM_STACK_NAME}_gzip@swarm , ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@swarm , ${SWARM_STACK_NAME}_webserver_retry
752+ - traefik.http.routers.${SWARM_STACK_NAME}_webserver.middlewares=${SWARM_STACK_NAME}_gzip@docker , ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@docker , ${SWARM_STACK_NAME}_webserver_retry
753753 networks : &webserver_networks
754754 - default
755755 - interactive_services_subnet
@@ -1160,7 +1160,7 @@ services:
11601160 retries : 50
11611161
11621162 traefik :
1163- image : " traefik:v3.1.2 @sha256:ec1a82940b8e00eaeef33fb4113aa1d1573b2ebb6440e10c023743fe96f08475 "
1163+ image : " traefik:v2.9.8 @sha256:553239e27c4614d0477651415205b9b119f7a98f698e6562ef383c9d8ff3b6e6 "
11641164 init : true
11651165 hostname : " {{.Node.Hostname}}-{{.Task.Slot}}"
11661166 command :
@@ -1169,7 +1169,7 @@ services:
11691169 - " --ping=true"
11701170 - " --entryPoints.ping.address=:9082"
11711171 - " --ping.entryPoint=ping"
1172- - " --log.level=WARN " # WARN, not WARNING
1172+ - " --log.level=WARNING"
11731173 - " --accesslog=false"
11741174 - " --metrics.prometheus=true"
11751175 - " --metrics.prometheus.addEntryPointsLabels=true"
@@ -1182,18 +1182,17 @@ services:
11821182 - " --entryPoints.simcore_api.forwardedHeaders.insecure"
11831183 - " --entryPoints.traefik_monitor.address=:8080"
11841184 - " --entryPoints.traefik_monitor.forwardedHeaders.insecure"
1185- - " --providers.swarm.endpoint=unix:///var/run/docker.sock"
1186- - " --providers.swarm.network=${SWARM_STACK_NAME}_default"
1185+ - " --providers.docker.endpoint=unix:///var/run/docker.sock"
1186+ - " --providers.docker.network=${SWARM_STACK_NAME}_default"
1187+ - " --providers.docker.swarmMode=true"
11871188 # https://github.com/traefik/traefik/issues/7886
1188- - " --providers.swarm.refreshSeconds=1"
1189- - " --providers.swarm.exposedByDefault=false"
1190- - " --providers.swarm.constraints=Label(`io.simcore.zone`, `${TRAEFIK_SIMCORE_ZONE}`)"
1191- - " --core.defaultRuleSyntax=v2"
1192- - " --tracing"
1193- - " --tracing.addinternals"
1194- - " --tracing.otlp=true"
1195- - " --tracing.otlp.http=true"
1196- # - "--tracing.otlp.http.endpoint=0.0.0.0:4318/v1/traces"
1189+ - " --providers.docker.swarmModeRefreshSeconds=1"
1190+ - " --providers.docker.exposedByDefault=false"
1191+ - " --providers.docker.constraints=Label(`io.simcore.zone`, `${TRAEFIK_SIMCORE_ZONE}`)"
1192+ - " --tracing=true"
1193+ - " --tracing.jaeger=true"
1194+ - " --tracing.jaeger.samplingServerURL=http://jaeger:5778/sampling"
1195+ - " --tracing.jaeger.localAgentHostPort=jaeger:6831"
11971196 volumes :
11981197 # So that Traefik can listen to the Docker events
11991198 - /var/run/docker.sock:/var/run/docker.sock
0 commit comments