Skip to content

Commit cdcfc81

Browse files
committed
Add API_ORIGIN env var to be able to split dashboard & API servers
1 parent 816b0f9 commit cdcfc81

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

apps/webapp/app/env.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const EnvironmentSchema = z.object({
3131
REMIX_APP_PORT: z.string().optional(),
3232
LOGIN_ORIGIN: z.string().default("http://localhost:3030"),
3333
APP_ORIGIN: z.string().default("http://localhost:3030"),
34+
API_ORIGIN: z.string().optional(),
3435
ELECTRIC_ORIGIN: z.string().default("http://localhost:3060"),
3536
APP_ENV: z.string().default(process.env.NODE_ENV),
3637
SERVICE_NAME: z.string().default("trigger.dev webapp"),

apps/webapp/app/v3/environmentVariables/environmentVariablesRepository.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ async function resolveBuiltInProdVariables(runtimeEnvironment: RuntimeEnvironmen
732732
},
733733
{
734734
key: "TRIGGER_API_URL",
735-
value: env.APP_ORIGIN,
735+
value: env.API_ORIGIN ?? env.APP_ORIGIN,
736736
},
737737
{
738738
key: "TRIGGER_RUNTIME_WAIT_THRESHOLD_IN_MS",

0 commit comments

Comments
 (0)