version: "3.5"

services:
  entry_node:
    container_name: entry_node
    image: golang:1.14
    entrypoint: /go/bin/main
    command: >
      --config-dir=/tmp
      --database.directory=/tmp/mainnetdb
      --autopeering.seed=uuDCzsjyLNQ17/7fWKPNMYmr4IWuaVRf7qKqRL0v/6c=
      --autopeering.entryNodes=
      --analysis.server.bindAddress=0.0.0.0:1888
      --analysis.dashboard.bindAddress=0.0.0.0:9000
      --node.enablePlugins=analysis-server,analysis-dashboard
      --node.disablePlugins=portcheck,dashboard,analysis-client,gossip,drng,issuer,sync,metrics,messagelayer,valuetransfers,webapi,webapibroadcastdataendpoint,webapifindtransactionhashesendpoint,webapigetneighborsendpoint,webapigettransactionobjectsbyhashendpoint,webapigettransactiontrytesbyhashendpoint
    volumes:
      - ./config.docker.json:/tmp/config.json:ro
      - goshimmer-cache:/go
    ports:
      - "127.0.0.1:9000:9000/tcp" # autopeering visualizer
    expose:
      - "1888/tcp" # analysis server (within Docker network)

  peer_master:
    container_name: peer_master
    image: golang:1.14
    entrypoint: /go/bin/main
    command: >
      --config-dir=/tmp
      --database.directory=/tmp/mainnetdb
      --node.enablePlugins=bootstrap
    volumes:
      - ./config.docker.json:/tmp/config.json:ro
      - goshimmer-cache:/go
    ports:
      - "127.0.0.1:8080:8080/tcp" # web API
      - "127.0.0.1:8081:8081/tcp" # dashboard
    depends_on:
      - entry_node

  peer_replica:
    image: golang:1.14
    entrypoint: /go/bin/main
    command: >
      --config-dir=/tmp
      --database.directory=/tmp/mainnetdb
      --node.disablePlugins=dashboard,portcheck
    volumes:
      - ./config.docker.json:/tmp/config.json:ro
      - goshimmer-cache:/go
    expose:
      - "8080/tcp" # web API (within Docker network)
    depends_on:
      - entry_node

volumes:
  goshimmer-cache:
    name: goshimmer-cache
