First, clone the zkDatabase
repository and navigate into the directory:
git clone https://github.com/orochi-network/zkDatabase
cd zkDatabase
Use Yarn to install all required dependencies:
yarn install
Build the project, which will compile all packages located in the packages
directory:
yarn run build
Each package in the packages
directory has its own .env.example
file. Copy these files to .env
and modify them as needed:
cp packages/your-package/.env.example packages/your-package/.env
Make sure to adjust any configurations in the .env
files according to your environment.
The project requires a running MongoDB replica set. Start the MongoDB instance using the provided script:
cd general/database/script
chmod +x start.sh
./start.sh
cd ..
docker compose up -d
You can modify the environment variables in the docker-compose.yml
file based on your requirements. If you keep the default settings, your MongoDB URL will be:
MONGODB_URL="mongodb://admin:password@mongo:27017/?directConnection=true"
To start proof-service
, you need to run broker-service
first. Then, set the BROKER_URL
in the .env
file of proof-service
to:
BROKER_URL="http://broker-service-app-1:4001/graphql"
Make sure to adjust the service name if necessary based on your Docker setup.
You can start individual services by navigating into each package directory and running the following command:
For example, to start the FTP service:
cd packages/ftp
yarn start
Before building and running Docker images, create the necessary Docker network:
make create-network
This command will create a zk
network if it does not already exist. You can change the network name in the Makefile
if needed.
To build Docker images for all services:
make build
This command will build the following services: ftp
, proof-service
, broker-service
, and serverless
.
To build a specific service, such as ftp
, use:
make build-ftp
To run all services:
make up
To run a specific service, such as ftp
:
make up-ftp
To run multiple specific services, such as ftp
and proof-service
:
make up-ftp up-proof
To stop all running services:
make down
To stop specific services, such as ftp
and proof-service
:
make stop-ftp stop-proof