Skip to content

Commit 2c67ccc

Browse files
committed
locally sticky is http
1 parent c0b894d commit 2c67ccc

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

services/docker-compose.local.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ services:
158158
- "3001:3000"
159159
deploy:
160160
labels:
161-
- traefik.http.services.${SWARM_STACK_NAME}_webserver.loadbalancer.sticky.cookie.secure=false
161+
# locally webserver is accessible through http://
162+
- traefik.http.services.${SWARM_STACK_NAME}_webserver_sticky.loadbalancer.sticky.cookie.secure=false
162163
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.service=${SWARM_STACK_NAME}_webserver
163164
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.entrypoints=http
164165
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.rule=PathPrefix(`/dev/`)

services/docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ services:
854854
WEBSERVER_FOLDERS: ${WEBSERVER_FOLDERS}
855855

856856
deploy:
857+
replicas: 5
857858
labels:
858859
- io.simcore.zone=${TRAEFIK_SIMCORE_ZONE}
859860
# gzip compression
@@ -874,11 +875,18 @@ services:
874875
- 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
875876
# Create a dedicated sticky service for specific endpoints
876877
- traefik.http.services.${SWARM_STACK_NAME}_webserver_sticky.loadbalancer.server.port=8080
878+
- traefik.http.services.${SWARM_STACK_NAME}_webserver_sticky.loadbalancer.sticky.cookie=true
877879
- traefik.http.services.${SWARM_STACK_NAME}_webserver_sticky.loadbalancer.sticky.cookie.secure=true
878880
- traefik.http.services.${SWARM_STACK_NAME}_webserver_sticky.loadbalancer.sticky.cookie.httpOnly=true
879881
- traefik.http.services.${SWARM_STACK_NAME}_webserver_sticky.loadbalancer.sticky.cookie.sameSite=lax
880882
# Single consolidated router for all sticky endpoints
881-
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_sticky.rule=Path(`/v0/projects`) || Path(`/v0/projects:clone`) || PathRegexp(`^/v0/projects/[0-9a-fA-F-]+/nodes/[0-9a-fA-F-]+:stop`) || PathRegexp(`^/v0/storage/locations/[0-9]+/paths/.+:size`) || PathRegexp(`^/v0/storage/locations/[0-9]+/-/paths:batchDelete`) || PathRegexp(`^/v0/storage/locations/[0-9]+/export-data`)
883+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_sticky.rule=Path(`/v0/projects`) ||
884+
Path(`/v0/projects:clone`) ||
885+
PathRegexp(`^/v0/projects/[0-9a-fA-F-]+/nodes/[0-9a-fA-F-]+:stop`) ||
886+
PathRegexp(`^/v0/storage/locations/[0-9]+/paths/.+:size`) ||
887+
PathRegexp(`^/v0/storage/locations/[0-9]+/-/paths:batchDelete`) ||
888+
PathRegexp(`^/v0/storage/locations/[0-9]+/export-data`) ||
889+
PathRegexp(`^/v0/tasks-legacy/.+`)
882890
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_sticky.entrypoints=http
883891
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_sticky.service=${SWARM_STACK_NAME}_webserver_sticky
884892
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_sticky.middlewares=${SWARM_STACK_NAME}_gzip@swarm, ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@swarm, ${SWARM_STACK_NAME}_webserver_retry

0 commit comments

Comments
 (0)