Skip to content

Commit 08f1ddb

Browse files
committed
updated formatting and added vercelsyncenvvars to the config file
1 parent d0fa045 commit 08f1ddb

File tree

1 file changed

+77
-21
lines changed

1 file changed

+77
-21
lines changed

docs/config/config-file.mdx

Lines changed: 77 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
1414

1515
export default defineConfig({
1616
//Your project ref (you can see it on the Project settings page in the dashboard)
17-
project: "proj_gtcwttqhhtlasxgfuhxs",
17+
project: "<project ref>",
1818
//The paths for your trigger folders
1919
dirs: ["./trigger"],
2020
retries: {
@@ -55,7 +55,8 @@ You can add lifecycle functions to get notified when any task starts, succeeds,
5555
import { defineConfig } from "@trigger.dev/sdk/v3";
5656

5757
export default defineConfig({
58-
//..other stuff
58+
project: "<project ref>",
59+
// Your other config settings...
5960
onSuccess: async (payload, output, { ctx }) => {
6061
console.log("Task succeeded", ctx.task.id);
6162
},
@@ -87,7 +88,8 @@ import { PrismaInstrumentation } from "@prisma/instrumentation";
8788
import { OpenAIInstrumentation } from "@traceloop/instrumentation-openai";
8889

8990
export default defineConfig({
90-
//..other stuff
91+
project: "<project ref>",
92+
// Your other config settings...
9193
instrumentations: [new PrismaInstrumentation(), new OpenAIInstrumentation()],
9294
});
9395
```
@@ -115,7 +117,8 @@ We currently only officially support the `node` runtime, but you can try our exp
115117
import { defineConfig } from "@trigger.dev/sdk/v3";
116118

117119
export default defineConfig({
118-
//..other stuff
120+
project: "<project ref>",
121+
// Your other config settings...
119122
runtime: "bun",
120123
});
121124
```
@@ -130,7 +133,8 @@ You can specify the default machine for all tasks in your project:
130133
import { defineConfig } from "@trigger.dev/sdk/v3";
131134

132135
export default defineConfig({
133-
//..other stuff
136+
project: "<project ref>",
137+
// Your other config settings...
134138
defaultMachine: "large-1x",
135139
});
136140
```
@@ -145,7 +149,8 @@ You can set the log level for your project:
145149
import { defineConfig } from "@trigger.dev/sdk/v3";
146150

147151
export default defineConfig({
148-
//..other stuff
152+
project: "<project ref>",
153+
// Your other config settings...
149154
logLevel: "debug",
150155
});
151156
```
@@ -160,7 +165,8 @@ You can set the default `maxDuration` for all tasks in your project:
160165
import { defineConfig } from "@trigger.dev/sdk/v3";
161166

162167
export default defineConfig({
163-
//..other stuff
168+
project: "<project ref>",
169+
// Your other config settings...
164170
maxDuration: 60, // 60 seconds
165171
});
166172
```
@@ -175,7 +181,8 @@ You can customize the build process using the `build` option:
175181
import { defineConfig } from "@trigger.dev/sdk/v3";
176182

177183
export default defineConfig({
178-
//..other stuff
184+
project: "<project ref>",
185+
// Your other config settings...
179186
build: {
180187
// Don't bundle these packages
181188
external: ["header-generator"],
@@ -197,7 +204,8 @@ All code is bundled by default, but you can exclude some packages from the bundl
197204
import { defineConfig } from "@trigger.dev/sdk/v3";
198205

199206
export default defineConfig({
200-
//..other stuff
207+
project: "<project ref>",
208+
// Your other config settings...
201209
build: {
202210
external: ["header-generator"],
203211
},
@@ -212,7 +220,8 @@ Each entry in the external should be a package name, not necessarily the import
212220
import { defineConfig } from "@trigger.dev/sdk/v3";
213221

214222
export default defineConfig({
215-
//..other stuff
223+
project: "<project ref>",
224+
// Your other config settings...
216225
build: {
217226
external: ["ai"],
218227
},
@@ -232,7 +241,8 @@ You can customize the `jsx` options that are passed to `esbuild` using the `jsx`
232241
import { defineConfig } from "@trigger.dev/sdk/v3";
233242

234243
export default defineConfig({
235-
//..other stuff
244+
project: "<project ref>",
245+
// Your other config settings...
236246
build: {
237247
jsx: {
238248
// Use the Fragment component instead of React.Fragment
@@ -258,7 +268,8 @@ You can add custom [import conditions](https://esbuild.github.io/api/#conditions
258268
import { defineConfig } from "@trigger.dev/sdk/v3";
259269

260270
export default defineConfig({
261-
//..other stuff
271+
project: "<project ref>",
272+
// Your other config settings...
262273
build: {
263274
conditions: ["react-server"],
264275
},
@@ -282,7 +293,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
282293
import { additionalFiles } from "@trigger.dev/build/extensions/core";
283294

284295
export default defineConfig({
285-
//..other stuff
296+
project: "<project ref>",
297+
// Your other config settings...
286298
build: {
287299
extensions: [
288300
additionalFiles({ files: ["wrangler/wrangler.toml", "./assets/**", "./fonts/**"] }),
@@ -304,7 +316,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
304316
import { additionalPackages } from "@trigger.dev/build/extensions/core";
305317

306318
export default defineConfig({
307-
//..other stuff
319+
project: "<project ref>",
320+
// Your other config settings...
308321
build: {
309322
extensions: [additionalPackages({ packages: ["wrangler"] })],
310323
},
@@ -317,7 +330,8 @@ This allows you to include additional packages in the build that are not automat
317330
import { defineConfig } from "@trigger.dev/sdk/v3";
318331

319332
export default defineConfig({
320-
//..other stuff
333+
project: "<project ref>",
334+
// Your other config settings...
321335
build: {
322336
extensions: [additionalPackages({ packages: ["[email protected]"] })],
323337
},
@@ -334,6 +348,7 @@ import { emitDecoratorMetadata } from "@trigger.dev/build/extensions/typescript"
334348

335349
export default defineConfig({
336350
project: "<project ref>",
351+
// Your other config settings...
337352
build: {
338353
extensions: [emitDecoratorMetadata()],
339354
},
@@ -365,6 +380,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
365380
import { prismaExtension } from "@trigger.dev/build/extensions/prisma";
366381

367382
export default defineConfig({
383+
project: "<project ref>",
384+
// Your other config settings...
368385
build: {
369386
extensions: [
370387
prismaExtension({
@@ -389,6 +406,7 @@ import { prismaExtension } from "@trigger.dev/build/extensions/prisma";
389406

390407
export default defineConfig({
391408
project: "<project ref>",
409+
// Your other config settings...
392410
build: {
393411
extensions: [
394412
prismaExtension({
@@ -431,6 +449,7 @@ import { prismaExtension } from "@trigger.dev/build/extensions/prisma";
431449

432450
export default defineConfig({
433451
project: "<project ref>",
452+
// Your other config settings...
434453
build: {
435454
extensions: [
436455
prismaExtension({
@@ -451,6 +470,7 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
451470

452471
export default defineConfig({
453472
project: "<project ref>",
473+
// Your other config settings...
454474
build: {
455475
extensions: [
456476
prismaExtension({
@@ -471,7 +491,36 @@ These environment variables are only used during the build process and are not e
471491

472492
#### syncEnvVars
473493

474-
The `syncEnvVars` build extension replaces the deprecated `resolveEnvVars` export. Check out our [syncEnvVars documentation](/deploy-environment-variables#sync-env-vars-from-another-service) for more information and example usage (including syncing environment variables from Infisical and Vercel).
494+
The `syncEnvVars` build extension replaces the deprecated `resolveEnvVars` export.
495+
496+
```ts
497+
import { syncEnvVars } from "@trigger.dev/build/extensions/core";
498+
499+
export default defineConfig({
500+
project: "<project ref>",
501+
// Your other config settings...
502+
build: {
503+
extensions: [syncEnvVars()],
504+
},
505+
});
506+
```
507+
508+
#### vercelSyncEnvVars
509+
510+
The `vercelSyncEnvVars` build extension syncs environment variables from your Vercel project to Trigger.dev.
511+
512+
```ts
513+
import { defineConfig } from "@trigger.dev/sdk/v3";
514+
import { vercelSyncEnvVars } from "@trigger.dev/build/extensions/vercelSyncEnvVars";
515+
516+
export default defineConfig({
517+
project: "<project ref>",
518+
// Your other config settings...
519+
build: {
520+
extensions: [vercelSyncEnvVars()],
521+
},
522+
});
523+
```
475524

476525
#### audioWaveform
477526

@@ -482,7 +531,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
482531
import { audioWaveform } from "@trigger.dev/build/extensions/audioWaveform";
483532

484533
export default defineConfig({
485-
//..other stuff
534+
project: "<project ref>",
535+
// Your other config settings...
486536
build: {
487537
extensions: [audioWaveform()], // uses verson 1.1.0 of audiowaveform by default
488538
},
@@ -525,6 +575,7 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
525575
import { ffmpeg } from "@trigger.dev/build/extensions/core";
526576

527577
export default defineConfig({
578+
project: "<project ref>",
528579
// Your other config settings...
529580
build: {
530581
extensions: [ffmpeg()],
@@ -539,7 +590,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
539590
import { ffmpeg } from "@trigger.dev/build/extensions/core";
540591

541592
export default defineConfig({
542-
//..other stuff
593+
project: "<project ref>",
594+
// Your other config settings...
543595
build: {
544596
extensions: [ffmpeg({ version: "6.0-4" })],
545597
},
@@ -561,6 +613,7 @@ import { sentryEsbuildPlugin } from "@sentry/esbuild-plugin";
561613

562614
export default defineConfig({
563615
project: "<project ref>",
616+
// Your other config settings...
564617
build: {
565618
extensions: [
566619
esbuildPlugin(
@@ -586,7 +639,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
586639
import { aptGet } from "@trigger.dev/build/extensions/core";
587640

588641
export default defineConfig({
589-
//..other stuff
642+
project: "<project ref>",
643+
// Your other config settings...
590644
build: {
591645
extensions: [aptGet({ packages: ["ffmpeg"] })],
592646
},
@@ -599,7 +653,8 @@ If you want to install a specific version of a package, you can specify the vers
599653
import { defineConfig } from "@trigger.dev/sdk/v3";
600654

601655
export default defineConfig({
602-
//..other stuff
656+
project: "<project ref>",
657+
// Your other config settings...
603658
build: {
604659
extensions: [aptGet({ packages: ["ffmpeg=6.0-4"] })],
605660
},
@@ -646,7 +701,8 @@ Instead of creating this function and worrying about types, you can define an ex
646701
import { defineConfig } from "@trigger.dev/sdk/v3";
647702

648703
export default defineConfig({
649-
//..other stuff
704+
project: "<project ref>",
705+
// Your other config settings...
650706
build: {
651707
extensions: [
652708
{

0 commit comments

Comments
 (0)