# This is a minimal docker-compose.yml template for running a Duniter instance
# For more detailed examples, look at docker/compose folder

version: "3.5"

services:
  duniter-v2s:
    container_name: duniter-v2s
    # choose the version of the image here
    image: duniter/duniter-v2s:latest
    ports:
      # telemetry
      - 9615:9615
      # rpc
      - 9933:9933
      # rpc-ws
      - 9944:9944
      # p2p
      - 30333:30333
    environment:
      DUNITER_NODE_NAME: "duniter_local"
      DUNITER_CHAIN_NAME: "gdev"
    volumes:
      - duniter-local-data:/var/lib/duniter
  distance-oracle:
    container_name: distance-oracle
    # choose the version of the image here
    image: duniter/duniter-v2s:latest
    entrypoint: docker-distance-entrypoint
    environment:
      ORACLE_RPC_URL: "ws://duniter-v2s:9944"
      ORACLE_RESULT_DIR: "/var/lib/duniter/chains/gdev/distance/"
      ORACLE_EXECUTION_INTERVAL: "10"
      ORACLE_MAX_DEPTH: "5"
      ORACLE_LOG_LEVEL: "info"
    volumes:
      - duniter-local-data:/var/lib/duniter

volumes:
  duniter-local-data:
