version: "3"

services:
  chibaclonkdnode0:
    container_name: chibaclonkdnode0
    image: "chibaclonkd/node"
    ports:
      - "26656-26657:26656-26657"
      - "1317:1317"
      - "9090:9090"
      - "8545:8545"
      - "8546:8546"
      - "8125:8125"
    environment:
      - ID=0
      - LOG=${LOG:-chibaclonkd.log}
    volumes:
      - ./localnet-setup/node0/chibaclonkd:/chibaclonk:Z
    networks:
      localnet:
        ipv4_address: 192.168.10.1

  chibaclonkdnode1:
    container_name: chibaclonkdnode1
    image: "chibaclonkd/node"
    ports:
      - "26666-26667:26656-26657"
      - "1318:1317"
      - "9091:9090"
      - "8555:8545"
      - "8556:8546"
      - "8126:8125"
    environment:
      - ID=1
      - LOG=${LOG:-chibaclonkd.log}
    volumes:
      - ./localnet-setup/node1/chibaclonkd:/chibaclonk:Z
    networks:
      localnet:
        ipv4_address: 192.168.10.2

  chibaclonkdnode2:
    container_name: chibaclonkdnode2
    image: "chibaclonkd/node"
    environment:
      - ID=2
      - LOG=${LOG:-chibaclonkd.log}
    ports:
      - "26676-26677:26656-26657"
      - "1319:1317"
      - "9092:9090"
      - "8565:8545"
      - "8566:8546"
      - "8127:8125"
    volumes:
      - ./localnet-setup/node2/chibaclonkd:/chibaclonk:Z
    networks:
      localnet:
        ipv4_address: 192.168.10.3

  chibaclonkdnode3:
    container_name: chibaclonkdnode3
    image: "chibaclonkd/node"
    environment:
      - ID=3
      - LOG=${LOG:-chibaclonkd.log}
    ports:
      - "26686-26687:26656-26657"
      - "1320:1317"
      - "9093:9090"
      - "8575:8545"
      - "8576:8546"
      - "8128:8125"
    volumes:
      - ./localnet-setup/node3/chibaclonkd:/chibaclonk:Z
    networks:
      localnet:
        ipv4_address: 192.168.10.4
    # entrypoint: "sh scripts/start-docker.sh"
    
networks:
  localnet:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 192.168.10.0/16