First, clone the zkDatabase repository and navigate into the directory:
git clone https://github.com/orochi-network/zkDatabase
cd zkDatabaseUse Yarn to install all required dependencies:
yarn installBuild the project, which will compile all packages located in the packages directory:
yarn run buildEach 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/.envMake 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 -dYou 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 mina-service, you need to run broker-service first. Then, set the BROKER_URL in the .env file of mina-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 startBefore building and running Docker images, create the necessary Docker network:
make create-networkThis 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 buildThis command will build the following services: ftp, mina-service, broker-service, and serverless.
To build a specific service, such as ftp, use:
make build-ftpTo run all services:
make upTo run a specific service, such as ftp:
make up-ftpTo run multiple specific services, such as ftp and mina-service:
make up-ftp up-proofTo stop all running services:
make downTo stop specific services, such as ftp and mina-service:
make stop-ftp stop-proof