@@ -20,8 +20,7 @@ services:
2020 - traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.path=/
2121 - traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.interval=2000ms
2222 - traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.timeout=1000ms
23- - traefik.http.routers.${SWARM_STACK_NAME}_api-server.rule=hostregexp(`{host:.+}`)
24- && (Path(`/`, `/v0`) || PathPrefix(`/v0/`))
23+ - traefik.http.routers.${SWARM_STACK_NAME}_api-server.rule=hostregexp(`{host:.+}`) && (Path(`/`, `/v0`) || PathPrefix(`/v0/`))
2524 - traefik.http.routers.${SWARM_STACK_NAME}_api-server.entrypoints=simcore_api
2625 - traefik.http.routers.${SWARM_STACK_NAME}_api-server.priority=1
2726 - traefik.http.routers.${SWARM_STACK_NAME}_api-server.middlewares=${SWARM_STACK_NAME}_gzip@docker,ratelimit-${SWARM_STACK_NAME}_api-server
@@ -156,9 +155,7 @@ services:
156155 - traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.interval=2000ms
157156 - traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.timeout=1000ms
158157 - traefik.http.middlewares.${SWARM_STACK_NAME}_static_webserver_retry.retry.attempts=2
159- - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=hostregexp(`{host:.+}`)
160- && (Path(`/osparc`,`/s4l`,`/tis`,`/transpiled`,`/resource`) ||
161- PathPrefix(`/osparc/`,`/s4l/`,`/tis/`,`/transpiled/`,`/resource/`))
158+ - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=hostregexp(`{host:.+}`) && (Path(`/osparc`,`/s4l`,`/tis`,`/transpiled`,`/resource`) || PathPrefix(`/osparc/`,`/s4l/`,`/tis/`,`/transpiled/`,`/resource/`))
162159 - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.service=${SWARM_STACK_NAME}_static_webserver
163160 - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.entrypoints=http
164161 - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.priority=2
@@ -167,11 +164,7 @@ services:
167164 - traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.service=${SWARM_STACK_NAME}_legacy_services_catchall
168165 - traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.priority=1
169166 - traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.entrypoints=http
170- - traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.rule=hostregexp(`{host:.+}`)
171- &&
172- (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}`)
173- ||
174- 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}/`))
167+ - 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}/`))
175168 # this tricks traefik into a 502 (bad gateway) since the service does not exist on this port
176169 - traefik.http.services.${SWARM_STACK_NAME}_legacy_services_catchall.loadbalancer.server.port=0
177170 # this tricks traefik into returning a 503 (service unavailable) since the healthcheck will always return false
@@ -235,15 +228,10 @@ services:
235228 - traefik.http.services.${SWARM_STACK_NAME}_webserver.loadbalancer.sticky.cookie.secure=true
236229 - traefik.http.middlewares.${SWARM_STACK_NAME}_webserver_retry.retry.attempts=2
237230 - traefik.http.routers.${SWARM_STACK_NAME}_webserver.service=${SWARM_STACK_NAME}_webserver
238- - traefik.http.routers.${SWARM_STACK_NAME}_webserver.rule=hostregexp(`{host:.+}`)
239- && (Path(`/`, `/v0`,`/socket.io/`,`/static-frontend-data.json`,
240- ` /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 }` ,
241- ` /view` , `/#/view`, `/#/error`) || PathPrefix(`/v0/`))
231+ - 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/`))
242232 - traefik.http.routers.${SWARM_STACK_NAME}_webserver.entrypoints=http
243233 - traefik.http.routers.${SWARM_STACK_NAME}_webserver.priority=2
244- - traefik.http.routers.${SWARM_STACK_NAME}_webserver.middlewares=${SWARM_STACK_NAME}_gzip@docker,
245- ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@docker,
246- ${SWARM_STACK_NAME}_webserver_retry
234+ - 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
247235 networks :
248236 - default
249237 - interactive_services_subnet
@@ -413,20 +401,37 @@ services:
413401 ]
414402
415403 redis :
416- image : " redis:5.0.9-alpine @sha256:b011c1ca7fa97ed92d6c5995e5dd752dc37fe157c1b60ce96a6e35701851dabc "
404+ image : " redis:6.2.6 @sha256:4bed291aa5efb9f0d77b76ff7d4ab71eee410962965d052552db1fb80576431d "
417405 init : true
418406 hostname : " {{.Node.Hostname}}-{{.Service.Name}}-{{.Task.Slot}}"
407+ command :
408+ # redis server will write a backup every 60 seconds if at least 1 key was changed
409+ # also aof (append only) is also enabled such that we get full durability at the expense
410+ # of backup size. The backup is written into /data.
411+ # https://redis.io/topics/persistence
412+ [
413+ " redis-server" ,
414+ " --save" ,
415+ " 60 1" ,
416+ " --loglevel" ,
417+ " verbose" ,
418+ " --databases" ,
419+ " 3" ,
420+ " --appendonly" ,
421+ " yes"
422+ ]
419423 networks :
420424 - default
421- - computational_services_subnet
425+ volumes :
426+ - redis-data:/data
422427 healthcheck :
423428 test : [ "CMD", "redis-cli", "ping" ]
424429 interval : 5s
425430 timeout : 30s
426431 retries : 50
427432
428433 traefik :
429- image : traefik:v2.5.6
434+ image : " traefik:v2.5.6@sha256:2f603f8d3abe1dd3a4eb28960c55506be48293b41ea2c6ed4a4297c851a57a05 "
430435 init : true
431436 hostname : " {{.Node.Hostname}}-{{.Service.Name}}-{{.Task.Slot}}"
432437 command :
@@ -454,8 +459,7 @@ services:
454459 # https://github.com/traefik/traefik/issues/7886
455460 - " --providers.docker.swarmModeRefreshSeconds=1"
456461 - " --providers.docker.exposedByDefault=false"
457- - " --providers.docker.constraints=Label(`io.simcore.zone`,
458- `${TRAEFIK_SIMCORE_ZONE}`)"
462+ - " --providers.docker.constraints=Label(`io.simcore.zone`, `${TRAEFIK_SIMCORE_ZONE}`)"
459463 - " --tracing=true"
460464 - " --tracing.jaeger=true"
461465 - " --tracing.jaeger.samplingServerURL=http://jaeger:5778/sampling"
@@ -490,6 +494,7 @@ services:
490494volumes :
491495 postgres_data : {}
492496 computational_shared_data : {}
497+ redis-data : {}
493498
494499networks :
495500 default :
0 commit comments