This document provides instructions for setting up the Bencher development environment.
In order to get started with the project, you will need to have the following prerequisites installed on your machine.
-
cargo install typeshare-cli --version 1.13.2 --locked
-
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- Fork the repository (optional)
- Clone the repository
git clone [email protected]:bencherdev/bencher.git
- Checkout the
devel
branchgit checkout devel
- Build the project
cargo build
- Run the API service
cd services/api cargo run
- Run the Console
cd services/console npm run dev
- Configure the CLI environment
cd ./services/cli . ./env.sh
Once the application is running, you can access it by visiting http://localhost:3000 in your browser.
- Sign up for an account by entering your name and email address.
- Click on the "Confirm Email" link that is provided in the API logs.
The API is accessible at http://localhost:61016.
To seed the database with sample data, run the following command:
cargo test-api seed
The data is stored in a SQLite database that is created in the services/api/data
directory
when the application is started. The database can be accessed using the sqlite3
command:
sqlite3 services/api/data/bencher.db
For additional development references, see the Architecture and Schema documents.
To test the application using Docker, follow these steps:
-
Build and run the project
docker/run.sh
or run directly with docker compose using the following command:
X64
ARCH=amd64 docker compose up --file docker/docker-compose.yml --build
ARM64
ARCH=arm64 docker compose up --file docker/docker-compose.yml --build
-
Open the console in your browser http://localhost:3000.
-
Sign up for an account by entering your name and email address.
-
Click on the "Confirm Email" link that is provided in the docker compose logs.