Skip to content

Latest commit

聽

History

History
130 lines (102 loc) 路 3.51 KB

File metadata and controls

130 lines (102 loc) 路 3.51 KB

Getting Started

This document provides instructions for setting up the Bencher development environment.

Prerequisites

In order to get started with the project, you will need to have the following prerequisites installed on your machine.

Installation

  1. Fork the repository (optional)
  2. Clone the repository
    git clone git@github.com:bencherdev/bencher.git
  3. Checkout the devel branch
    git checkout devel
  4. Build the project
    cargo build
  5. Run the API service
    cd services/api
    cargo run
  6. Run the Console
    cd services/console
    npm run dev
  7. Configure the CLI environment
    cd ./services/cli
    . ./env.sh

Accessing the Console

Once the application is running, you can access it by visiting http://localhost:3000 in your browser.

  1. Sign up for an account by entering your name and email address.
  2. Click on the "Confirm Email" link that is provided in the API logs.

Running the Console Against the Dev API

The steps above run the Console against an API on your own machine, which is what you want when you are changing the API or need the "Confirm Email" link from its logs.

To work on the Console alone, you can skip running the API and point the Console at the deployed dev API instead:

cd services/console
npm run dev:dev-api

The Console is still served from http://localhost:3000, but every request goes to https://dev.api.bencher.dev, so you need an account on dev.bencher.dev to log in.

Accessing the API

The API is accessible at http://localhost:6610.

Seeding the Database

To seed the database with sample data, run the following command:

cargo test-api seed

Accessing the Database

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

Architecture and Entity Relationship Diagram

For additional development references, see the Architecture and Schema documents.

Testing with Docker

To test the application using Docker, follow these steps:

  1. 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
  2. Open the console in your browser http://localhost:3000.

  3. Sign up for an account by entering your name and email address.

  4. Click on the "Confirm Email" link that is provided in the docker compose logs.