Hub
HUMAN Website
  • HUMAN Protocol Document Hub
  • HUMAN Tech Docs
    • Architecture
      • Components
        • Smart Contracts
          • Escrow.sol
          • EscrowFactory.sol
          • Contract Addresses
        • Dashboard
        • Job Launcher
          • Standard
          • HUMAN Job Launcher
        • Exchange Oracle
          • Standard
        • Recording Oracle
          • Standard
        • Reputation Oracle
          • Standard
          • HUMAN Reputation Oracle
        • HUMAN App
        • Annotation Tools
          • CVAT
          • hCaptcha
          • Fortune (test)
      • Protocol Features
        • Routing Protocol
        • Abuse System
        • Qualifications System
        • Governance
    • SDK
    • Tutorials
      • Job Requesters
        • Signup
        • Launch Jobs
          • Fortune
      • Workers
        • Sign Up
        • KYC Verification
        • Wallet address registration
      • Operators
        • Sign Up
      • HMToken
        • Bridge
          • Ethereum <--> Polygon
          • Ethereum <--> Binance Smart Chain
    • Developer
      • Prerequisites
      • Initial setup
      • Run web3 in Docker
      • Run services in Docker
      • Setting up Oracles
      • Running HUMAN Protocol with CVAT
        • Running CVAT
        • Setting up Worker user
        • Launch simple CVAT job
      • FAQ
  • Routing Protocol Tokenomics
    • Status
    • Premise
    • Token design
    • Proposition for a governance minimization model
    • Liquidity provision /market making
    • Alternate Conviction voting model
    • Voting model
    • The HUMAN-RP Magistrate
    • Voting process
    • Security
    • Policies
    • Slashing and Soft-freezing
    • Staking for tool vendors
  • Grants Program
    • Introduction and Program Overview
    • Application Process
      • Application Process of the HUMAN Grants Program
    • Funded Projects
    • Community
    • Help & FAQs
    • Terms and condition
  • Guide to the HUMAN Protocol SDK's
Powered by GitBook
LogoLogo

© 2023 HPF. HUMAN Protocol® is a registered trademark

On this page
  • Preparing .env files
  • Creating infra and building images

Was this helpful?

  1. HUMAN Tech Docs
  2. Developer

Run services in Docker

On this page you will find steps to run HUMAN Protocol services locally in Docker using testnet.

PreviousRun web3 in DockerNextSetting up Oracles

Last updated 2 days ago

Was this helpful?

Everything you need to spin up services is located in docker-setup folder, so let’s make it our working directory:

cd docker-setup/

This setup is focused on using testnet instead of running web3 locally, so you can have some persistent data on chain and on subgraph. It also uses different set of docker containers (and volumes) for storing DB-like data, so anything in human-protocol-local-setup is persistent for you (unless you remove it by pruning your local docker).

The above is not the case for docker-compose.dev.yml that is expected to be used for local dev only and has separate set of services and volumes that can be safely pruned.


Preparing .env files

Before you build or run any services, you need to prepare env file named .env (or .env.development , because NODE_ENV=development for docker setup) for it and fill it with valid values (see ). Docker Compose will use created env file from the specific service folder as a base and override only necessary values.

If you have multiple files, such as .env.{NODE_ENV}, .env.local and .env, then they are resolved in corresponding order, e.g. for NODE_ENV=development env files are parsed from left to right: .env.development, .env.local , .env and the first value set for a variable will win.


Creating infra and building images

In order to make sure that all necessary infra is set up and services can be started, run next command:

make check-env-file infra-up

The step above:

  • ensures that no environment variables are missing for Docker Compose setup

  • ensures that human-cvat-bridge network (that is needed to have stable communication between HUMAN Protocol and CVAT) is created

  • spins up necessary infrastructure containers (Postgre, Redis, Minio) with pre-defined setup for all services

Since docker setup is focused on using testn

After the above command is successful, you can either build all services w/o running:

make build-services

or build and run them

# To build and run all services
make services-up
# To build and run specific services (use service names from docker-compose as args)
make services-up service1 service2

First-time run can take some time to build docker images for all services, don't expect it to be quick.

Setting up environment variables