-
Install NodeJS v22.12.0 LTS. You can use a NodeJS version manager like
nvmto do this:nvm install v22.12.0 nvm use v22.12.0 -
Install
pnpm v9.15.5by runningnpm i -g pnpm@9.15.5. -
Create a
.envfile. You can use the.env.exampleas 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
It is advised to run pnpm i locally and also delete the node_modules cache mount by running docker compose --profile PROFILE down -v in this case before rebuilding.
Obviously, changes to .env also require container restarts.
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.