# =============================================================================
# Turnstone Docker Compose Stack
#
# Usage:
#   Infra only:           docker compose up
#   Single node:          docker compose --profile production up
#   Production (PG):      DB_BACKEND=postgresql docker compose --profile production up
#   10-node cluster:      docker compose --profile cluster up
#   Cluster + DDG:        docker compose --profile ddgCluster up
#   100-node stress:      docker compose --profile ddgStressCluster up
#   With simulator:       docker compose --profile sim up
# =============================================================================

name: turnstone

networks:
  turnstone-net:
    driver: bridge

volumes:
  redis-data:
  turnstone-data:
  postgres-data:

services:
  # -------------------------------------------------------------------
  # PostgreSQL — production database (profile: production)
  # -------------------------------------------------------------------
  postgres:
    image: pgautoupgrade/pgautoupgrade:18-alpine
    profiles:
      - production
      - cluster
      - ddgCluster
      - ddgStressCluster
    command:
      - postgres
      - -c
      - max_connections=${POSTGRES_MAX_CONNECTIONS:-300}
      - -c
      - shared_buffers=128MB
    environment:
      POSTGRES_DB: turnstone
      POSTGRES_USER: ${POSTGRES_USER:-turnstone}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required for production profile}
      PGDATA: /var/lib/postgresql/data
    volumes:
      - postgres-data:/var/lib/postgresql/data
    networks:
      - turnstone-net
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-turnstone}"]
      interval: 5s
      timeout: 3s
      retries: 5
      start_period: 30s
    deploy:
      resources:
        limits:
          memory: 1G
          cpus: '1.0'
    restart: unless-stopped

  # -------------------------------------------------------------------
  # Redis — message broker, pub/sub, node registry
  # -------------------------------------------------------------------
  redis:
    image: redis:8.6-alpine
    command:
      - sh
      - -c
      - >-
        redis-server
        --save 60 1
        --loglevel warning
        $${REDIS_PASSWORD:+--requirepass $$REDIS_PASSWORD}
    ports:
      - "${REDIS_PORT:-6379}:6379"
    environment:
      - REDIS_PASSWORD=${REDIS_PASSWORD:-}
    volumes:
      - redis-data:/data
    networks:
      - turnstone-net
    healthcheck:
      test:
        - CMD-SHELL
        - redis-cli $${REDIS_PASSWORD:+-a $$REDIS_PASSWORD} ping | grep -q PONG
      interval: 5s
      timeout: 3s
      retries: 5
      start_period: 5s
    restart: unless-stopped

  # -------------------------------------------------------------------
  # turnstone-server — Web UI + chat workstreams + LLM interaction
  # -------------------------------------------------------------------
  server:
    build:
      context: .
      dockerfile: Dockerfile
    profiles:
      - production
    command:
      - sh
      - -c
      - >-
        turnstone-server
        --host 0.0.0.0
        --port 8080
        --base-url "$${LLM_BASE_URL}"
        --api-key "$${OPENAI_API_KEY}"
        $${MODEL:+--model $$MODEL}
        $${SKIP_PERMISSIONS:+--skip-permissions}
        $${MCP_CONFIG:+--mcp-config $$MCP_CONFIG}
    ports:
      - "${SERVER_PORT:-8080}:8080"
    volumes:
      - turnstone-data:/data
      - ./docker/mcp-ddg.json:/etc/turnstone/mcp-ddg.json:ro
    environment:
      - LLM_BASE_URL=${LLM_BASE_URL:-http://host.docker.internal:8000/v1}
      - OPENAI_API_KEY=${OPENAI_API_KEY:-dummy}
      - TAVILY_API_KEY=${TAVILY_API_KEY:-}
      - SKIP_PERMISSIONS=${SKIP_PERMISSIONS:-}
      - TURNSTONE_AUTH_ENABLED=${TURNSTONE_AUTH_ENABLED:-}
      - TURNSTONE_AUTH_TOKEN=${TURNSTONE_AUTH_TOKEN:-}
      - TURNSTONE_JWT_SECRET=${TURNSTONE_JWT_SECRET:-}
      - MODEL=${MODEL:-}
      - MCP_CONFIG=${MCP_CONFIG:-}
      - TURNSTONE_DB_BACKEND=${DB_BACKEND:-sqlite}
      - TURNSTONE_DB_URL=${DATABASE_URL:-}
      - TURNSTONE_NODE_ID=${TURNSTONE_NODE_ID:-}
    extra_hosts:
      - "host.docker.internal:host-gateway"
    networks:
      - turnstone-net
    depends_on:
      redis:
        condition: service_healthy
      postgres:
        condition: service_healthy
        required: false
      ddg-search:
        condition: service_healthy
        required: false
    healthcheck:
      test: ["CMD", "python", "/usr/local/bin/healthcheck.py", "http://127.0.0.1:8080/health"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 60s
    restart: unless-stopped

  # -------------------------------------------------------------------
  # turnstone-bridge — Redis <-> HTTP bridge for multi-node routing
  # Node ID auto-generated from container hostname (no --node-id needed)
  # -------------------------------------------------------------------
  bridge:
    build:
      context: .
      dockerfile: Dockerfile
    profiles:
      - production
    command:
      - turnstone-bridge
      - --server-url=http://server:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    environment:
      - REDIS_PASSWORD=${REDIS_PASSWORD:-}
      - TURNSTONE_AUTH_TOKEN=${TURNSTONE_AUTH_TOKEN:-}
      - TURNSTONE_JWT_SECRET=${TURNSTONE_JWT_SECRET:-}
      - TURNSTONE_DB_BACKEND=${DB_BACKEND:-sqlite}
      - TURNSTONE_DB_URL=${DATABASE_URL:-}
    networks:
      - turnstone-net
    depends_on:
      server:
        condition: service_healthy
      redis:
        condition: service_healthy
    restart: unless-stopped

  # -------------------------------------------------------------------
  # turnstone-console — Cluster dashboard
  # -------------------------------------------------------------------
  console:
    build:
      context: .
      dockerfile: Dockerfile
    command:
      - turnstone-console
      - --host=0.0.0.0
      - --port=8090
      - --redis-host=redis
      - --redis-port=6379
      - --poll-interval=${CONSOLE_POLL_INTERVAL:-10}
    ports:
      - "${CONSOLE_PORT:-8090}:8090"
    environment:
      - REDIS_PASSWORD=${REDIS_PASSWORD:-}
      - TURNSTONE_AUTH_ENABLED=${TURNSTONE_AUTH_ENABLED:-}
      - TURNSTONE_AUTH_TOKEN=${TURNSTONE_AUTH_TOKEN:-}
      - TURNSTONE_JWT_SECRET=${TURNSTONE_JWT_SECRET:-}
      - TURNSTONE_DB_BACKEND=${DB_BACKEND:-sqlite}
      - TURNSTONE_DB_URL=${DATABASE_URL:-}
    networks:
      - turnstone-net
    depends_on:
      redis:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "python", "/usr/local/bin/healthcheck.py", "http://127.0.0.1:8090/health"]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 10s
    restart: unless-stopped

  # -------------------------------------------------------------------
  # turnstone-channel — Channel gateway (Discord, Slack, etc.)
  # Requires TURNSTONE_DISCORD_TOKEN to enable Discord adapter
  # -------------------------------------------------------------------
  channel:
    build:
      context: .
      dockerfile: Dockerfile
    profiles:
      - production
      - cluster
      - ddgCluster
    command:
      - sh
      - -c
      - >-
        turnstone-channel
        --redis-host=redis
        --redis-port=6379
        --http-host=0.0.0.0
        $${TURNSTONE_DISCORD_GUILD:+--discord-guild $$TURNSTONE_DISCORD_GUILD}
    environment:
      - TURNSTONE_DISCORD_TOKEN=${TURNSTONE_DISCORD_TOKEN:-}
      - TURNSTONE_DISCORD_GUILD=${TURNSTONE_DISCORD_GUILD:-0}
      - REDIS_PASSWORD=${REDIS_PASSWORD:-}
      - TURNSTONE_JWT_SECRET=${TURNSTONE_JWT_SECRET:-}
      - TURNSTONE_DB_BACKEND=${DB_BACKEND:-sqlite}
      - TURNSTONE_DB_URL=${DATABASE_URL:-}
      - TURNSTONE_CHANNEL_ADVERTISE_URL=http://channel:8091
    networks:
      - turnstone-net
    depends_on:
      redis:
        condition: service_healthy
      postgres:
        condition: service_healthy
        required: false
    restart: unless-stopped

  # -------------------------------------------------------------------
  # ddg-search — DuckDuckGo Search MCP server (HTTP transport)
  # Provides web search + content fetch tools to turnstone via MCP.
  # No API key required.
  #
  # Start with: MCP_CONFIG=/etc/turnstone/mcp-ddg.json \
  #             docker compose --profile ddgCluster up
  # -------------------------------------------------------------------
  ddg-search:
    image: python:3.14-slim
    profiles:
      - ddgCluster
      - ddgStressCluster
    command:
      - sh
      - -c
      - >-
        pip install --no-cache-dir duckduckgo-mcp-server &&
        python -c "from mcp.server.transport_security import TransportSecuritySettings; import duckduckgo_mcp_server.server as s; s.safe_search=s.SafeSearchMode.OFF; s.mcp.settings.host='0.0.0.0'; s.mcp.settings.port=3000; s.mcp.settings.transport_security=TransportSecuritySettings(enable_dns_rebinding_protection=False); s.mcp.run(transport='streamable-http')"
    networks:
      - turnstone-net
    healthcheck:
      test: ["CMD-SHELL", "python -c \"import socket; s=socket.create_connection(('0.0.0.0',3000),2); s.close()\""]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 30s
    deploy:
      resources:
        limits:
          memory: 256M
          cpus: '0.25'
    restart: unless-stopped

  # -------------------------------------------------------------------
  # turnstone-sim — Multi-node cluster simulator (no LLM needed)
  # Start with: docker compose --profile sim up
  # -------------------------------------------------------------------
  sim:
    build:
      context: .
      dockerfile: Dockerfile
    profiles:
      - sim
    command:
      - sh
      - -c
      - >-
        turnstone-sim
        --nodes "$${SIM_NODES}"
        --scenario "$${SIM_SCENARIO}"
        --duration "$${SIM_DURATION}"
        --mps "$${SIM_MPS}"
        --redis-host redis
        --redis-port 6379
        --log-level "$${SIM_LOG_LEVEL}"
        $${SIM_SEED:+--seed $$SIM_SEED}
        $${SIM_METRICS_FILE:+--metrics-file $$SIM_METRICS_FILE}
    environment:
      - REDIS_PASSWORD=${REDIS_PASSWORD:-}
      - SIM_NODES=${SIM_NODES:-100}
      - SIM_SCENARIO=${SIM_SCENARIO:-steady}
      - SIM_DURATION=${SIM_DURATION:-60}
      - SIM_MPS=${SIM_MPS:-5.0}
      - SIM_LOG_LEVEL=${SIM_LOG_LEVEL:-INFO}
      - SIM_SEED=${SIM_SEED:-}
      - SIM_METRICS_FILE=${SIM_METRICS_FILE:-}
    networks:
      - turnstone-net
    depends_on:
      redis:
        condition: service_healthy
    restart: "no"

  # ===================================================================
  # 10-node cluster (profile: cluster)
  #
  # Each node is a server + bridge pair.  All share the same PostgreSQL
  # and Redis instances.  Access via console at :8090.
  #
  # Start:  docker compose --profile cluster up
  # ===================================================================

  # -- cluster servers ------------------------------------------------

  server-1: &cluster-server
    image: turnstone:local
    build: { context: ., dockerfile: Dockerfile }
    profiles: [cluster, ddgCluster]
    command: &cluster-server-cmd
      - sh
      - -c
      - >-
        turnstone-server
        --host 0.0.0.0
        --port 8080
        --base-url "$${LLM_BASE_URL}"
        --api-key "$${OPENAI_API_KEY}"
        $${MODEL:+--model $$MODEL}
        $${SKIP_PERMISSIONS:+--skip-permissions}
        $${MCP_CONFIG:+--mcp-config $$MCP_CONFIG}
    volumes:
      - turnstone-data:/data
      - ./docker/mcp-ddg.json:/etc/turnstone/mcp-ddg.json:ro
    environment: &cluster-server-env
      LLM_BASE_URL: ${LLM_BASE_URL:-http://host.docker.internal:8000/v1}
      OPENAI_API_KEY: ${OPENAI_API_KEY:-dummy}
      TAVILY_API_KEY: ${TAVILY_API_KEY:-}
      SKIP_PERMISSIONS: ${SKIP_PERMISSIONS:-}
      TURNSTONE_AUTH_ENABLED: ${TURNSTONE_AUTH_ENABLED:-}
      TURNSTONE_AUTH_TOKEN: ${TURNSTONE_AUTH_TOKEN:-}
      TURNSTONE_JWT_SECRET: ${TURNSTONE_JWT_SECRET:-}
      MODEL: ${MODEL:-}
      MCP_CONFIG: ${MCP_CONFIG:-}
      TURNSTONE_DB_BACKEND: ${DB_BACKEND:-postgresql}
      TURNSTONE_DB_URL: ${DATABASE_URL:-postgresql://${POSTGRES_USER:-turnstone}:${POSTGRES_PASSWORD:?}@postgres:5432/turnstone}
      TURNSTONE_NODE_ID: node-1
    extra_hosts: ["host.docker.internal:host-gateway"]
    networks: [turnstone-net]
    depends_on:
      redis: { condition: service_healthy }
      postgres: { condition: service_healthy }
      ddg-search: { condition: service_healthy, required: false }
    healthcheck:
      test: ["CMD", "python", "/usr/local/bin/healthcheck.py", "http://127.0.0.1:8080/health"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 60s
    deploy:
      resources:
        limits: { memory: 384M, cpus: '0.5' }
    restart: unless-stopped

  server-2:
    <<: *cluster-server
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: node-2 }
  server-3:
    <<: *cluster-server
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: node-3 }
  server-4:
    <<: *cluster-server
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: node-4 }
  server-5:
    <<: *cluster-server
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: node-5 }
  server-6:
    <<: *cluster-server
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: node-6 }
  server-7:
    <<: *cluster-server
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: node-7 }
  server-8:
    <<: *cluster-server
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: node-8 }
  server-9:
    <<: *cluster-server
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: node-9 }
  server-10:
    <<: *cluster-server
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: node-10 }

  # -- cluster bridges ------------------------------------------------

  bridge-1: &cluster-bridge
    image: turnstone:local
    build: { context: ., dockerfile: Dockerfile }
    profiles: [cluster, ddgCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    environment: &cluster-bridge-env
      REDIS_PASSWORD: ${REDIS_PASSWORD:-}
      TURNSTONE_AUTH_TOKEN: ${TURNSTONE_AUTH_TOKEN:-}
      TURNSTONE_JWT_SECRET: ${TURNSTONE_JWT_SECRET:-}
      TURNSTONE_DB_BACKEND: ${DB_BACKEND:-postgresql}
      TURNSTONE_DB_URL: ${DATABASE_URL:-postgresql://${POSTGRES_USER:-turnstone}:${POSTGRES_PASSWORD:?}@postgres:5432/turnstone}
    networks: [turnstone-net]
    depends_on:
      server-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
    restart: unless-stopped

  bridge-2:
    <<: *cluster-bridge
    command:
      - turnstone-bridge
      - --server-url=http://server-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-2: { condition: service_healthy }
      redis: { condition: service_healthy }
  bridge-3:
    <<: *cluster-bridge
    command:
      - turnstone-bridge
      - --server-url=http://server-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-3: { condition: service_healthy }
      redis: { condition: service_healthy }
  bridge-4:
    <<: *cluster-bridge
    command:
      - turnstone-bridge
      - --server-url=http://server-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-4: { condition: service_healthy }
      redis: { condition: service_healthy }
  bridge-5:
    <<: *cluster-bridge
    command:
      - turnstone-bridge
      - --server-url=http://server-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-5: { condition: service_healthy }
      redis: { condition: service_healthy }
  bridge-6:
    <<: *cluster-bridge
    command:
      - turnstone-bridge
      - --server-url=http://server-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-6: { condition: service_healthy }
      redis: { condition: service_healthy }
  bridge-7:
    <<: *cluster-bridge
    command:
      - turnstone-bridge
      - --server-url=http://server-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-7: { condition: service_healthy }
      redis: { condition: service_healthy }
  bridge-8:
    <<: *cluster-bridge
    command:
      - turnstone-bridge
      - --server-url=http://server-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-8: { condition: service_healthy }
      redis: { condition: service_healthy }
  bridge-9:
    <<: *cluster-bridge
    command:
      - turnstone-bridge
      - --server-url=http://server-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-9: { condition: service_healthy }
      redis: { condition: service_healthy }
  bridge-10:
    <<: *cluster-bridge
    command:
      - turnstone-bridge
      - --server-url=http://server-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-10: { condition: service_healthy }
      redis: { condition: service_healthy }

  # ===================================================================
  # 100-node stress cluster (profile: ddgStressCluster)
  #
  # 10 groups x 10 nodes = 100 server+bridge pairs.
  # Groups: alpha, beta, gamma, delta, epsilon, zeta, eta, theta,
  #         iota, kappa
  #
  # Start:  docker compose --profile ddgStressCluster up
  # ===================================================================

  # -- stress cluster servers ----------------------------------------

  server-alpha-1:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: alpha-1 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-alpha-2:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: alpha-2 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-alpha-3:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: alpha-3 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-alpha-4:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: alpha-4 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-alpha-5:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: alpha-5 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-alpha-6:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: alpha-6 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-alpha-7:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: alpha-7 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-alpha-8:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: alpha-8 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-alpha-9:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: alpha-9 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-alpha-10:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: alpha-10 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }

  server-beta-1:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: beta-1 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-beta-2:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: beta-2 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-beta-3:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: beta-3 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-beta-4:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: beta-4 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-beta-5:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: beta-5 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-beta-6:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: beta-6 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-beta-7:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: beta-7 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-beta-8:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: beta-8 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-beta-9:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: beta-9 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-beta-10:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: beta-10 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }

  server-gamma-1:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: gamma-1 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-gamma-2:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: gamma-2 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-gamma-3:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: gamma-3 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-gamma-4:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: gamma-4 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-gamma-5:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: gamma-5 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-gamma-6:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: gamma-6 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-gamma-7:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: gamma-7 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-gamma-8:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: gamma-8 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-gamma-9:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: gamma-9 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-gamma-10:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: gamma-10 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }

  server-delta-1:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: delta-1 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-delta-2:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: delta-2 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-delta-3:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: delta-3 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-delta-4:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: delta-4 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-delta-5:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: delta-5 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-delta-6:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: delta-6 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-delta-7:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: delta-7 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-delta-8:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: delta-8 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-delta-9:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: delta-9 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-delta-10:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: delta-10 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }

  server-epsilon-1:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: epsilon-1 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-epsilon-2:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: epsilon-2 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-epsilon-3:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: epsilon-3 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-epsilon-4:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: epsilon-4 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-epsilon-5:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: epsilon-5 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-epsilon-6:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: epsilon-6 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-epsilon-7:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: epsilon-7 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-epsilon-8:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: epsilon-8 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-epsilon-9:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: epsilon-9 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-epsilon-10:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: epsilon-10 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }

  server-zeta-1:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: zeta-1 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-zeta-2:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: zeta-2 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-zeta-3:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: zeta-3 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-zeta-4:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: zeta-4 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-zeta-5:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: zeta-5 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-zeta-6:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: zeta-6 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-zeta-7:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: zeta-7 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-zeta-8:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: zeta-8 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-zeta-9:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: zeta-9 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-zeta-10:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: zeta-10 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }

  server-eta-1:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: eta-1 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-eta-2:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: eta-2 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-eta-3:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: eta-3 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-eta-4:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: eta-4 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-eta-5:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: eta-5 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-eta-6:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: eta-6 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-eta-7:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: eta-7 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-eta-8:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: eta-8 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-eta-9:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: eta-9 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-eta-10:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: eta-10 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }

  server-theta-1:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: theta-1 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-theta-2:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: theta-2 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-theta-3:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: theta-3 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-theta-4:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: theta-4 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-theta-5:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: theta-5 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-theta-6:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: theta-6 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-theta-7:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: theta-7 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-theta-8:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: theta-8 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-theta-9:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: theta-9 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-theta-10:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: theta-10 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }

  server-iota-1:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: iota-1 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-iota-2:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: iota-2 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-iota-3:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: iota-3 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-iota-4:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: iota-4 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-iota-5:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: iota-5 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-iota-6:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: iota-6 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-iota-7:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: iota-7 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-iota-8:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: iota-8 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-iota-9:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: iota-9 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-iota-10:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: iota-10 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }

  server-kappa-1:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: kappa-1 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-kappa-2:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: kappa-2 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-kappa-3:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: kappa-3 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-kappa-4:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: kappa-4 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-kappa-5:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: kappa-5 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-kappa-6:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: kappa-6 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-kappa-7:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: kappa-7 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-kappa-8:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: kappa-8 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-kappa-9:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: kappa-9 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }
  server-kappa-10:
    <<: *cluster-server
    profiles: [ddgStressCluster]
    environment: { <<: *cluster-server-env, TURNSTONE_NODE_ID: kappa-10 }
    deploy:
      resources:
        limits: { memory: 256M, cpus: '0.25' }

  # -- stress cluster bridges ----------------------------------------

  bridge-alpha-1:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-alpha-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-alpha-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-alpha-2:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-alpha-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-alpha-2: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-alpha-3:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-alpha-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-alpha-3: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-alpha-4:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-alpha-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-alpha-4: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-alpha-5:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-alpha-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-alpha-5: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-alpha-6:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-alpha-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-alpha-6: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-alpha-7:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-alpha-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-alpha-7: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-alpha-8:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-alpha-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-alpha-8: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-alpha-9:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-alpha-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-alpha-9: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-alpha-10:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-alpha-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-alpha-10: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }

  bridge-beta-1:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-beta-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-beta-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-beta-2:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-beta-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-beta-2: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-beta-3:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-beta-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-beta-3: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-beta-4:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-beta-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-beta-4: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-beta-5:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-beta-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-beta-5: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-beta-6:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-beta-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-beta-6: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-beta-7:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-beta-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-beta-7: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-beta-8:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-beta-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-beta-8: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-beta-9:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-beta-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-beta-9: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-beta-10:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-beta-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-beta-10: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }

  bridge-gamma-1:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-gamma-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-gamma-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-gamma-2:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-gamma-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-gamma-2: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-gamma-3:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-gamma-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-gamma-3: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-gamma-4:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-gamma-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-gamma-4: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-gamma-5:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-gamma-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-gamma-5: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-gamma-6:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-gamma-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-gamma-6: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-gamma-7:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-gamma-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-gamma-7: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-gamma-8:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-gamma-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-gamma-8: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-gamma-9:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-gamma-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-gamma-9: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-gamma-10:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-gamma-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-gamma-10: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }

  bridge-delta-1:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-delta-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-delta-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-delta-2:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-delta-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-delta-2: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-delta-3:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-delta-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-delta-3: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-delta-4:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-delta-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-delta-4: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-delta-5:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-delta-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-delta-5: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-delta-6:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-delta-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-delta-6: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-delta-7:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-delta-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-delta-7: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-delta-8:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-delta-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-delta-8: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-delta-9:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-delta-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-delta-9: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-delta-10:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-delta-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-delta-10: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }

  bridge-epsilon-1:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-epsilon-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-epsilon-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-epsilon-2:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-epsilon-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-epsilon-2: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-epsilon-3:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-epsilon-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-epsilon-3: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-epsilon-4:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-epsilon-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-epsilon-4: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-epsilon-5:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-epsilon-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-epsilon-5: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-epsilon-6:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-epsilon-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-epsilon-6: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-epsilon-7:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-epsilon-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-epsilon-7: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-epsilon-8:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-epsilon-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-epsilon-8: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-epsilon-9:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-epsilon-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-epsilon-9: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-epsilon-10:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-epsilon-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-epsilon-10: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }

  bridge-zeta-1:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-zeta-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-zeta-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-zeta-2:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-zeta-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-zeta-2: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-zeta-3:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-zeta-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-zeta-3: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-zeta-4:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-zeta-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-zeta-4: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-zeta-5:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-zeta-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-zeta-5: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-zeta-6:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-zeta-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-zeta-6: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-zeta-7:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-zeta-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-zeta-7: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-zeta-8:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-zeta-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-zeta-8: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-zeta-9:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-zeta-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-zeta-9: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-zeta-10:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-zeta-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-zeta-10: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }

  bridge-eta-1:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-eta-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-eta-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-eta-2:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-eta-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-eta-2: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-eta-3:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-eta-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-eta-3: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-eta-4:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-eta-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-eta-4: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-eta-5:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-eta-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-eta-5: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-eta-6:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-eta-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-eta-6: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-eta-7:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-eta-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-eta-7: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-eta-8:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-eta-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-eta-8: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-eta-9:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-eta-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-eta-9: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-eta-10:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-eta-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-eta-10: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }

  bridge-theta-1:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-theta-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-theta-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-theta-2:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-theta-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-theta-2: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-theta-3:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-theta-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-theta-3: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-theta-4:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-theta-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-theta-4: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-theta-5:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-theta-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-theta-5: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-theta-6:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-theta-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-theta-6: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-theta-7:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-theta-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-theta-7: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-theta-8:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-theta-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-theta-8: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-theta-9:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-theta-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-theta-9: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-theta-10:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-theta-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-theta-10: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }

  bridge-iota-1:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-iota-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-iota-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-iota-2:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-iota-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-iota-2: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-iota-3:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-iota-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-iota-3: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-iota-4:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-iota-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-iota-4: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-iota-5:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-iota-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-iota-5: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-iota-6:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-iota-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-iota-6: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-iota-7:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-iota-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-iota-7: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-iota-8:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-iota-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-iota-8: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-iota-9:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-iota-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-iota-9: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-iota-10:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-iota-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-iota-10: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }

  bridge-kappa-1:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-kappa-1:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-kappa-1: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-kappa-2:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-kappa-2:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-kappa-2: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-kappa-3:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-kappa-3:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-kappa-3: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-kappa-4:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-kappa-4:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-kappa-4: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-kappa-5:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-kappa-5:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-kappa-5: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-kappa-6:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-kappa-6:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-kappa-6: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-kappa-7:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-kappa-7:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-kappa-7: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-kappa-8:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-kappa-8:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-kappa-8: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-kappa-9:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-kappa-9:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-kappa-9: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
  bridge-kappa-10:
    <<: *cluster-bridge
    profiles: [ddgStressCluster]
    command:
      - turnstone-bridge
      - --server-url=http://server-kappa-10:8080
      - --redis-host=redis
      - --redis-port=6379
      - --heartbeat-ttl=${HEARTBEAT_TTL:-60}
      - --approval-timeout=${APPROVAL_TIMEOUT:-3600}
    depends_on:
      server-kappa-10: { condition: service_healthy }
      redis: { condition: service_healthy }
    deploy:
      resources:
        limits: { memory: 128M, cpus: '0.1' }
