
version: "3.7"

networks:
  mother:
    external: true


# ig clients stack
  
services:

  twentyfortyeight:
    image: registry.vnfco.ir/ig/game/2048:latest
    environment:
      - TZ=Asia/Tehran
    #   - NODE_ENV=production
    #   - REACT_APP_SIGNAL_URL=https://ls.igarson.app
    #   - REACT_APP_PATH_URL=/api/v1
    #   - REACT_APP_STORAGE_URL=https://storage.igarson.app
    #   - REACT_APP_SIGNAL_URL_PATH=/restauranthub
    #   - REACT_APP_LOG_LENGTH=20
    #   - REACT_APP_SOCKET_SECRET=GodProtectedKeyTools
    #   - REACT_APP_SECRET_KEY_GAME=6JCvBmi1ADry5Qk0bLaV+5klnAqYaVtjn+HSHG4N4pOAEl480saobylNWcudDxhvgw6q0yzVmbYH+lQIS3RmEHLXRHYAHxsdXl5MBuqU/p1oCC3SWmYke1SWHkoTUOm1f8SBZ1HucOxBHv7psqFUu5lG38P/EPiozv6/0qDU+vVFFp6v9ZTigBihLll0mU6qR14krot8+y9tOnrLDkHxw3wLvWsB4wgd9+RAY97Gzzs7ix3nAXthsT+jPWdyuENiKSuKEyHKbDqciJRBGqktgYU9XkYIfZzEm4cxhscT9jqNsUg2ml+uJdDQOps2mL5LgNetWWmcP43xPIkxAwu5oK873GV3uZOdQqYE2CBYT66+/+Yp5xzoL4+qZUUiDEpfWKm+clRlAm1Keiur
    deploy:
      update_config:
        parallelism: 1
        delay: 10s
        order: start-first
      restart_policy:
        condition: any
        delay: 5s
        window: 120s 
      resources:
        limits:
          cpus: '0.5'
          memory: 50M
      replicas: 1
      mode: replicated
      placement:
        constraints:
          - node.role == worker
    ports:
      - 6001:80
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
    networks:
      - mother



  sudoku:
    image: registry.vnfco.ir/ig/game/sudoku:latest
    environment:
      - TZ=Asia/Tehran
    #   - NODE_ENV=production
    #   - REACT_APP_SIGNAL_URL=https://ls.igarson.app
    #   - REACT_APP_PATH_URL=/api/v1
    #   - REACT_APP_STORAGE_URL=https://storage.igarson.app
    #   - REACT_APP_SIGNAL_URL_PATH=/restauranthub
    #   - REACT_APP_LOG_LENGTH=20
    #   - REACT_APP_SOCKET_SECRET=GodProtectedKeyTools
    #   - REACT_APP_SECRET_KEY_GAME=6JCvBmi1ADry5Qk0bLaV+5klnAqYaVtjn+HSHG4N4pOAEl480saobylNWcudDxhvgw6q0yzVmbYH+lQIS3RmEHLXRHYAHxsdXl5MBuqU/p1oCC3SWmYke1SWHkoTUOm1f8SBZ1HucOxBHv7psqFUu5lG38P/EPiozv6/0qDU+vVFFp6v9ZTigBihLll0mU6qR14krot8+y9tOnrLDkHxw3wLvWsB4wgd9+RAY97Gzzs7ix3nAXthsT+jPWdyuENiKSuKEyHKbDqciJRBGqktgYU9XkYIfZzEm4cxhscT9jqNsUg2ml+uJdDQOps2mL5LgNetWWmcP43xPIkxAwu5oK873GV3uZOdQqYE2CBYT66+/+Yp5xzoL4+qZUUiDEpfWKm+clRlAm1Keiur
    deploy:
      update_config:
        parallelism: 1
        delay: 10s
        order: start-first
      restart_policy:
        condition: any
        delay: 5s
        window: 120s 
      resources:
        limits:
          cpus: '0.5'
          memory: 50M
      replicas: 1
      mode: replicated
      placement:
        constraints:
          - node.role == worker
    ports:
      - 6002:80
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
    networks:
      - mother



  mafia:
    image: registry.vnfco.ir/ig/game/mafia/ui:latest
    environment:
      - TZ=Asia/Tehran
    #   - NODE_ENV=production
    #   - REACT_APP_SIGNAL_URL=https://ls.igarson.app
    #   - REACT_APP_PATH_URL=/api/v1
    #   - REACT_APP_STORAGE_URL=https://storage.igarson.app
    #   - REACT_APP_SIGNAL_URL_PATH=/restauranthub
    #   - REACT_APP_LOG_LENGTH=20
    #   - REACT_APP_SOCKET_SECRET=GodProtectedKeyTools
    #   - REACT_APP_SECRET_KEY_GAME=6JCvBmi1ADry5Qk0bLaV+5klnAqYaVtjn+HSHG4N4pOAEl480saobylNWcudDxhvgw6q0yzVmbYH+lQIS3RmEHLXRHYAHxsdXl5MBuqU/p1oCC3SWmYke1SWHkoTUOm1f8SBZ1HucOxBHv7psqFUu5lG38P/EPiozv6/0qDU+vVFFp6v9ZTigBihLll0mU6qR14krot8+y9tOnrLDkHxw3wLvWsB4wgd9+RAY97Gzzs7ix3nAXthsT+jPWdyuENiKSuKEyHKbDqciJRBGqktgYU9XkYIfZzEm4cxhscT9jqNsUg2ml+uJdDQOps2mL5LgNetWWmcP43xPIkxAwu5oK873GV3uZOdQqYE2CBYT66+/+Yp5xzoL4+qZUUiDEpfWKm+clRlAm1Keiur
    deploy:
      update_config:
        parallelism: 1
        delay: 10s
        order: start-first
      restart_policy:
        condition: any
        delay: 5s
        window: 120s 
      resources:
        limits:
          cpus: '0.5'
          memory: 50M
      replicas: 1
      mode: replicated
      placement:
        constraints:
          - node.role == worker
    ports:
      - 6003:80
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
    networks:
      - mother

  mafiaserver:
    image: registry.vnfco.ir/ig/game/mafia/server:latest
    environment:
      - TZ=Asia/Tehran
      - HOST=0.0.0.0
      - PORT=3000
      - MAFIA_MINIMUM_PLAYER_NUMBER=6
      - REDIS_PORT=6379
      - REDIS_HOST=redismaster
      - REDIS_AUTH=Mf7VXwbaJQuMRd1sETVl79A7URUTyiEFwctGk3RhD+q74DmKDzc2SztYEZ2YynLZI8xuq7b9gNz2e7g2MNfU9sP8q+bEK9CqAu3y2Zu4xkVyzyYKdFMT696IB/SS1M7rvZKw7NBYT99lGCpj1edk+6hRpK/Qy2pfiVo29VKEgSXnkeJaM9nMJQ3wxN/1gLJd/uTGGf85nZWhUTEIdK58lJPSXLU55VqcaksahJHlg2oz5P5FNXWRPCnSC7obJ4OtkuHNw/P8REEL0KDyZ9khilU/XvzSgzp+v5i9hmUdKO3B8r+Y4keUZyaKz2VxCHSGAuqWSCpe+do1qQ==
      - REDIS_DB=2
      - REACT_APP_MAFIA_GAME_SECRET=6JCvBmi1ADry5Qk0bLaV+5klnAqYaVtjn+HSHG4N4pOAEl480saobylNWcudDxhvgw6q0yzVmbYH+lQIS3RmEHLXRHYAHxsdXl5MBuqU/p1oCC3SWmYke1SWHkoTUOm1f8SBZ1HucOxBHv7psqFUu5lG38P/EPiozv6/0qDU+vVFFp6v9ZTigBihLll0mU6qR14krot8+y9tOnrLDkHxw3wLvWsB4wgd9+RAY97Gzzs7ix3nAXthsT+jPWdyuENiKSuKEyHKbDqciJRBGqktgYU9XkYIfZzEm4cxhscT9jqNsUg2ml+uJdDQOps2mL5LgNetWWmcP43xPIkxAwu5oK873GV3uZOdQqYE2CBYT66+/+Yp5xzoL4+qZUUiDEpfWKm+clRlAm1Keiur
    #   - NODE_ENV=production
    #   - REACT_APP_SIGNAL_URL=https://ls.igarson.app
    #   - REACT_APP_PATH_URL=/api/v1
    #   - REACT_APP_STORAGE_URL=https://storage.igarson.app
    #   - REACT_APP_SIGNAL_URL_PATH=/restauranthub
    #   - REACT_APP_LOG_LENGTH=20
    #   - REACT_APP_SOCKET_SECRET=GodProtectedKeyTools
    #   - REACT_APP_SECRET_KEY_GAME=6JCvBmi1ADry5Qk0bLaV+5klnAqYaVtjn+HSHG4N4pOAEl480saobylNWcudDxhvgw6q0yzVmbYH+lQIS3RmEHLXRHYAHxsdXl5MBuqU/p1oCC3SWmYke1SWHkoTUOm1f8SBZ1HucOxBHv7psqFUu5lG38P/EPiozv6/0qDU+vVFFp6v9ZTigBihLll0mU6qR14krot8+y9tOnrLDkHxw3wLvWsB4wgd9+RAY97Gzzs7ix3nAXthsT+jPWdyuENiKSuKEyHKbDqciJRBGqktgYU9XkYIfZzEm4cxhscT9jqNsUg2ml+uJdDQOps2mL5LgNetWWmcP43xPIkxAwu5oK873GV3uZOdQqYE2CBYT66+/+Yp5xzoL4+qZUUiDEpfWKm+clRlAm1Keiur
    deploy:
      update_config:
        parallelism: 1
        delay: 10s
        order: start-first
      restart_policy:
        condition: any
        delay: 5s
        window: 120s 
      resources:
        limits:
          cpus: '0.5'
          memory: 50M
      replicas: 1
      mode: replicated
      placement:
        constraints:
          - node.role == worker
    ports:
      - 6023:3000
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
    networks:
      - mother

# quiz 
# quiz api