version: "3.9"

services:
  cryptor-sender:
    image: caduceus/cmp2-test-net-meta-crypto:v0.0.1
    container_name: cryptor-sender
    deploy:
      restart_policy:
        condition: on-failure
        delay: 15s
        max_attempts: 100
        window: 120s
    volumes:
      - ./cryptor/config.toml:/root/config.toml 
  sender: 
    image: caduceus/cmp2-test-net-tester:v0.0.12-12
    container_name: sender
    entrypoint:  sh -c 'echo +sender+ && sender  -test.run TestManyToMany  /privatefromto-100_000.tmp 192.168.1.220  192.168.1.10  100000 0 50000 >> /sender/sender.log  2>&1 ' 
    #entrypoint: sh -c 'sender  -test.run TestManyToMany -test.timeout 0  /privatefromto-10_000.tmp  192.168.1.220  cryptor-sender 30000'
    #echo "    entrypoint: sh -c 'echo "+"ring"+" && sleep 10 && sender  -test.run TestManyToMany -test.timeout 0  "
    #entrypoint: sh -c 'echo "sender" && sleep 40 && go test  -v -run TestSendSignatureTxsStream   ./rpc/grpc/  --timeout 0 -args  ring  192.168.1.242  100000'
    ports:
      - "2115:2115"   
    volumes:
      - ./sender/sender:/sender/             
    depends_on:                      
      - cryptor-sender                    
  cadvisor-sender:
    image: google/cadvisor:latest
    container_name: cadvisor-sender
    ports:
      - "8081:8080"
    volumes:
      - /:/rootfs:ro
      - /var/run:/var/run:rw
      - /sys:/sys:ro
      - /var/lib/docker/:/var/lib/docker:ro
    depends_on:
      - cryptor-sender
      - sender
  prometheus-sender:
    image: prom/prometheus:latest
    container_name: prometheus-sender
    ports:
      - "9090:9090"
    command:
      - --config.file=/etc/prometheus/prometheus.yml
      - --storage.tsdb.path=/prometheus
    volumes:
      - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
      - ./sender/prometheus:/prometheus
    depends_on:
      - cadvisor-sender
