sockudo 2.7.3

A simple, fast, and secure WebSocket server for real-time applications.
Documentation
# =============================================================================
# Sockudo Lightweight Test Services
# =============================================================================

name: sockudo-test

services:
  # Single Redis instance
  redis-test:
    image: redis:7-alpine
    ports:
      - "16379:6379"
    healthcheck:
      test: [ "CMD", "redis-cli", "ping" ]
      interval: 15s
      timeout: 5s
      retries: 2
      start_period: 5s
    networks:
      - sockudo-network
    mem_limit: 128m
    cpus: '0.5'

  # Redis Cluster using grokzen/redis-cluster image (designed for testing)
  redis-cluster:
    image: grokzen/redis-cluster:7.0.10
    environment:
      IP: 0.0.0.0
      INITIAL_PORT: 7003
      MASTERS: 3
      SLAVES_PER_MASTER: 0
    ports:
      - "7003:7003"
      - "7001:7001"  
      - "7002:7002"
    networks:
      - sockudo-network
    mem_limit: 256m
    cpus: '0.5'

  # Minimal NATS Cluster (2 nodes)
  nats-1:
    image: nats:alpine
    ports:
      - "14222:4222"
      - "18222:8222"  # HTTP monitoring
    command: |
      --name nats-1
      --cluster_name NATS
      --cluster nats://0.0.0.0:6222
      --routes nats://nats-2:6222
      --http_port 8222
    networks:
      - sockudo-network
    mem_limit: 128m
    cpus: '0.25'

  nats-2:
    image: nats:alpine
    ports:
      - "14223:4222"
      - "18223:8222"  # HTTP monitoring
    command: |
      --name nats-2
      --cluster_name NATS
      --cluster nats://0.0.0.0:6222
      --routes nats://nats-1:6222
      --http_port 8222
    networks:
      - sockudo-network
    mem_limit: 128m
    cpus: '0.25'

  # Development MySQL with sample data
  mysql-test:
    image: mysql:8.0
    environment:
      - MYSQL_ROOT_PASSWORD=root123
      - MYSQL_DATABASE=sockudo
      - MYSQL_INITDB_SKIP_TZINFO=1
    command: --bind-address=0.0.0.0 --default-authentication-plugin=mysql_native_password --innodb-buffer-pool-size=128M --max-connections=50 --performance-schema=OFF
    ports:
      - "13306:3306"
    volumes:
      - mysql-test-data:/var/lib/mysql
      - ./sql/init-sql-docker.sql:/docker-entrypoint-initdb.d/01-init-sql.sql:ro
      - ./sql/init-test.sql:/docker-entrypoint-initdb.d/02-init-test.sql:ro
    networks:
      - sockudo-network
    mem_limit: 512m
    cpus: '0.5'
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-proot123"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 30s

networks:
  sockudo-network:
    driver: bridge

volumes:
  mysql-test-data:
    driver: local