LogoLogo
WebsiteDIA AppRequest integration
  • DIA Oracles Overview
  • Intro to Lumina
    • How it works
    • Integrated chains
  • Data products & Tools
    • Token price feeds
  • Oracle Builder (Beta)
  • How-to guides
    • Fetch price data
      • Push based oracles
      • Pull based oracles
      • Contract Addresses
    • Run a Feeder
      • Hardware specs
      • Setting up the node
        • Docker compose
        • Docker run
        • Kubernetes
    • Stake DIA
    • Request a custom oracle
  • Reference
    • Architecture
      • Data sourcing
      • Data computation
      • Data delivery
    • Cross-chain Messaging
  • Resources
    • Audits
    • Chain information
    • Nexus Documentation
    • Community & Support
    • T&C
      • Licence Agreement
      • Contributor Covenant Code of Conduct
      • Disclaimer
Powered by GitBook
On this page
  • Configure Environment Variables
  • Retrieve Deployed Contract
  • Remove Container (Optional)
  1. How-to guides
  2. Run a Feeder
  3. Setting up the node

Docker compose

PreviousSetting up the nodeNextDocker run

Last updated 1 month ago

Configure Environment Variables

  1. Navigate to the docker-compose folder where docker-compose.yaml file is located.

cd docker-compose
  1. Create a .env file in the same folder. it should contain the following variables:

  • NODE_OPERATOR_NAME: A unique and descriptive name identifying the organization or entity running the node. This name is used for monitoring and should be chosen carefully to ensure it is both meaningful and recognizable (e.g., include your organization name or geographical region). Providing a clear name helps distinguish your node in dashboards and logs.

  • CHAIN_ID: set the chain ID value

  • PRIVATE_KEY: Your private key for the deployment.

  • DEPLOYED_CONTRACT: The contract address. Initially, leave this empty during the first deployment to retrieve the deployed contract.

The following pushgateway vars are mandatory for official DIA node operators. If you're an official operator, please reach out to the team to get these credentials. For developers testing the system, these credentials are optional and can be skipped.

  • PUSHGATEWAY_URL: The Pushgateway endpoint used for pushing metrics to Prometheus.

  • PUSHGATEWAY_USER: to allow decentralized-feeder authenticate towards the monitoring server.

  • PUSHGATEWAY_PASSWORD: to allow decentralized-feeder authenticate towards the monitoring server.

For additional environment variable configurations, refer to and .

E.g. Env file:

NODE_OPERATOR_NAME=
CHAIN_ID=
PRIVATE_KEY=
DEPLOYED_CONTRACT=
PUSHGATEWAY_URL=
PUSHGATEWAY_USER=
PUSHGATEWAY_PASSWORD=
  1. Open a terminal in the docker-compose folder and start the deployment by running:

docker-compose up

Retrieve Deployed Contract

  1. Once the container is deployed with DEPLOYED_CONTRACT env variable empty the logs will display the deployed contract address in the following format:

│ time="2024-11-25T11:30:08Z" level=info msg="Contract pending deploy: 0xxxxxxxxxxxxxxxxxxxxxxxxxx."
  1. Copy the displayed contract address (e.g., 0xxxxxxxxxxxxxxxxxxxxxxxxxx) and stop the container with

docker rm -f <container_name>
  1. Check if the container is running correctly by viewing the logs. Run the following command:

docker-compose logs -f
  1. Look for logs similar to the example below, which indicate a successful startup:

│ time="2024-10-29T13:39:35Z" level=info msg="Processor - Atomic filter value for market Binance:SUSHI-USDT with 20 trades: 0.7095307176575745."                                                                  │
│ time="2024-10-29T13:39:35Z" level=info msg="Processor - Atomic filter value for market Simulation:UNI-USDC with 1 trades: 8.008539500390082."                                                                   │
│ time="2024-10-29T13:39:35Z" level=info msg="Processor - Atomic filter value for market Crypto.com:USDT-USD with 5 trades: 0.99948."                                                                             │
│ time="2024-10-29T13:39:35Z" level=info msg="Processor - filter median for MOVR: 9.864475653518195."                                                                                                             │
│ time="2024-10-29T13:39:35Z" level=info msg="Processor - filter median for STORJ: 0.4672954012114179."                                                                                                           │
│ time="2024-10-29T13:39:35Z" level=info msg="Processor - filter median for DIA: 0.9839597410694259."                                                                                                             │
│ time="2024-10-29T13:39:35Z" level=info msg="Processor - filter median for WETH: 2626.9564003841315."   

Remove Container (Optional)

  1. You can optionally cleanup the deployment once you're done by running:

docker rm -f <container_name>
  1. Verify the container has been removed:

docker ps -a
Adding Exchange Pairs
Watchdog environment variables