Installation
This guide will walk you through the process of installing and running the torus-ts
monorepo.
Prerequisites
- Node.js -
20.16.0
or higher. - PNPM -
9.7.1
or higher. - Docker - installation guide.
- Just - installation guide.
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
-
Clone the repository
Terminal window Clone using the web URL.
Terminal window https://github.com/renlabs-dev/torus-ts.gitUse a password-protected SSH key.
Terminal window gh repo clone renlabs-dev/torus-tsUse the GitHub CLI.
-
Install the dependencies
Terminal window pnpm install# orjust install
-
Configure environment variables
There is an
.env.example
in the root directory you can use for referenceTerminal window cp .env.example .env
-
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 1337Push the Drizzle schema to the database:
Terminal window just db-pushYou can also use the
just db-studio
command to open a GUI provided by Drizzle.
-
Build the project
Terminal window just build
-
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