version: '3'

services:
  ganachetest:
    entrypoint: ["node", "/app/ganache-core.docker.cli.js", "-a", "20", "-b", "2", "--debug", "-m", "coast bar giraffe art venue decide symbol law visual crater vital fold", "-e", "1000"]
    image: trufflesuite/ganache-cli:latest

  ebrelayera:
    build:
      context: .
      dockerfile: Dockerfile-cross2eth

  ebrelayerb:
    build:
      context: .
      dockerfile: Dockerfile-cross2eth

  ebrelayerc:
    build:
      context: .
      dockerfile: Dockerfile-cross2eth

  ebrelayerd:
    build:
      context: .
      dockerfile: Dockerfile-cross2eth

  chain33:
    entrypoint: /root/entrypoint.sh
    environment:
      PARAFILE: "/root/chain33.para33.toml"
    expose:
      - "8802"

  chain32:
    entrypoint: /root/entrypoint.sh
    environment:
      PARAFILE: "/root/chain33.para32.toml"

  chain31:
    entrypoint: /root/entrypoint.sh
    environment:
      PARAFILE: "/root/chain33.para31.toml"

  chain30:
    entrypoint: /root/entrypoint.sh
    environment:
      PARAFILE: "/root/chain33.para30.toml"
    expose:
      - "8802"

  chain29:
    entrypoint: /root/entrypoint.sh
    environment:
      PARAFILE: "/root/chain33.para29.toml"

  nginx:
    image: nginx:latest
    depends_on:
      - chain33
      - chain30
      - chain29
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf
    expose:
      - "8803"