Skip to content

Installation

This guide will walk you through the process of installing and running the torus-ts monorepo.

Prerequisites

Docker Tip

If you have difficulties or want alternatives to simplify using Docker, consider:

  • Colima: A lightweight solution for running containers on macOS.
  • Orbstack: A fast and efficient alternative for managing containers.

Monorepo setup


  1. Clone the repository
    Terminal window
    git clone [email protected]:renlabs-dev/torus-ts.git

    Clone using the web URL.


  2. Install the dependencies
    Terminal window
    pnpm install
    # or
    just install

  3. Configure environment variables

    There is an .env.example in the root directory you can use for reference

    Terminal window
    cp .env.example .env

  4. Setup database

    Create a postgres container with docker:

    Terminal window
    docker run --name torus-db-container \
    -e POSTGRES_PASSWORD=password \
    -e POSTGRES_DB=torus-ts-db \
    -e POSTGRES_USER=postgres \
    -p 1337:1337 \
    -d postgres:16-alpine \
    postgres -p 1337

    Push the Drizzle schema to the database:

    Terminal window
    just db-push

    You can also use the just db-studio command to open a GUI provided by Drizzle.


  5. Build the project
    Terminal window
    just build

  6. Run the project

    From the root directory, run the following command:

    Terminal window
    just dev <app-name>

    From the app directory, run the following command:

    Terminal window
    pnpm run dev