-
Install NodeJS v22.12.0 LTS. You can use a NodeJS version manager like
nvm
to do this:nvm install v22.12.0 nvm use v22.12.0
-
Install
pnpm
by runningnpm i -g pnpm
. -
Create a
.env
file. You can use the.env.example
as a template. -
Install dependencies:
cd app pnpm i
This project uses Docker Compose profiles. Currently, there is one profile: dev
and prod
.
Run docker compose --profile PROFILE down
to stop and delete all containers in the specified profile.
Note
Adding the -v
flag only deletes the node_modules
cache mount. To clear database data, you'll need to delete the db/data
folder, which usually needs root permissions.
Run docker compose --profile PROFILE up --build
to build and run all containers in the specified profile. Adding the -d
flag runs the containers in the background.
The dev
profile binds mount your source code into the containers and so supports hot reloading with Vite. However, changes to the package.json
and pnpm-lock.yaml
do require full container rebuilds.
Note
If you're on Windows and hot-reloading doesn't seem to be working, add this snippet inside the config object in app/vite.config.ts
:
server: {
watch: {
usePolling: true,
}
}
This is detailed here.