trigger.dev
Development
Warning
All the following commands should be launched from the monorepo root directory
-
Install the dependencies.
pnpm install -
Environment variables. You will need to create copies of the
.env.examplefiles inapp/webappcp ./apps/webapp/.env.example ./apps/webapp/.env -
Start postgresql
pnpm run docker:dbNote: The npm script will complete while Docker sets up the container in the background. Ensure that Docker has finished and your container is running before proceeding.
-
Generate prisma schema
pnpm run generate -
Run the Prisma migration to the database
pnpm run db:migrate:deploy -
Make sure Pular has started by following the instructions below under "Starting and Stopping Pulsar"
-
Run the first build (with dependencies via the
...option)pnpm run build --filter=webapp...Running simply
pnpm run buildwill build everything, including the NextJS app. -
Run the Remix dev server
pnpm run dev --filter=webapp
Starting and Stopping Pulsar
Both the webapp and coordinate apps rely on Apache Pulsar running on your local machine.
- Run the pulsar container
In a separate terminal window, run the following command:
./pulsar/start.sh - Wait until pulsar is available
In yet another terminal window, run this command and when it's finished pulsar will be ready
until curl http://localhost:8080/admin/v2/brokers/internal-configuration > /dev/null 2>&1 ; do sleep 1; done - Stop pulsar
In the terminal window where you ran
./pulsar/start.sh, go ahead and CTRL-C and then run./pulsar/stop.sh
Tests, Typechecks, Lint, Install packages...
Check the turbo.json file to see the available pipelines.
- Run the Cypress tests and Dev
pnpm run test:e2e:dev --filter=webapp - Lint everything
pnpm run lint - Typecheck the whole monorepo
pnpm run typecheck - Test the whole monorepo
pnpm run test or pnpm run test:dev - How to install an npm package in the Remix app ?
pnpm add dayjs --filter webapp - Tweak the tsconfigs, eslint configs in the
config-packagefolder. Any package or app will then extend from these configs.