Skip to content

Bash scripts for booting the full backend across local and test environments

Notifications You must be signed in to change notification settings

OpenQDev/OpenQ-Fullstack

Repository files navigation

OpenQ-Fullstack

Welcome to OpenQ! The world's simplest crypto-powered bounty system.

Let's get you started.

OpenQ Microservices

The OpenQ fullstack consists of several containerized microservices and a local JSON RPC Ethereum node.

Install

Get a GitHub Personal Access Token (PAT)

Create a PAT with these scopes:

public_repo
read:org
read:user

Now export your PAT as an environment variable, to make it available to the install script:

export PAT=...

Prepare Repositories

If, and only if, you are using GitHub codespaces, you should create another PAT with the scope: repo (Full control of private repositories) and then run the command:

git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"

Note: make sure that the global .gitconfig file only contains one config for insteadOf "https://github.com/".

To clone and prepare all repositories run:

./install.sh

This will automatically generate all necessary .env files.

Boot

To boot with docker-compose, simply run:

./boot.sh

This starts the docker-compose.yml file you can find in OpenQ-Fullstack/docker-compose.yml.

Forks

To install your own forked repositories, export an environment variable:

export OPENQ_FORKS=username/OpenQ-Frontend,username/OpenQ-Contracts

Then run install.sh again. If you have previously cloned any of the repositories, remove them first.

Configuring Docker Desktop with more memory

It's likely you'll need to provision additional memory for Docker Desktop.

Preferences -> Resources -> Slide Memory to 16GB

Connect Metamask to Local Testnet

The OpenQ-Fullstack Boot will prepare a Hardhat Testnet on your machine at http://localhost:8545.

Add this Custom Network RPC URL by following the instructions here.

Access Services

Each service will be exposed to your localhost at the following URLs for individual testing.

I suggest using Postman if you'd like to hit a service directly.

OpenQ Service URL
OpenQ-Frontend localhost:3000
Mongo-Express localhost:8888
OpenQ-API localhost:4000
OpenQ-Oracle localhost:8090
OpenQ-Github-OAuth-Server localhost:3001
OpenQ-CoinAPI localhost:8081
OpenQ-Graph localhost:8000/subgraphs/name/openqdev/openq
OpenQ-JSON-RPC-Node localhost:8545
OpenQ-OZ-Claim-Autotask localhost:8070
Redis localhost:6379

About

Bash scripts for booting the full backend across local and test environments

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages