Skip to content

Commit 8118993

Browse files
authored
add custom env file support (#1089)
* feat(env): custom env file support * Update env.ts
1 parent b1d806e commit 8118993

File tree

1 file changed

+3
-2
lines changed
  • services/workflows-service/src

1 file changed

+3
-2
lines changed

services/workflows-service/src/env.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import 'dotenv/config';
1+
import { config } from 'dotenv';
22
import { createEnv } from '@t3-oss/env-core';
33
import { z } from 'zod';
44

5+
config({ path: '.env' });
6+
57
export const env = createEnv({
68
/*
79
* clientPrefix is required.
@@ -11,7 +13,6 @@ export const env = createEnv({
1113
NODE_ENV: z.enum(['development', 'production', 'test', 'local']),
1214
ENV_FILE_NAME: z.string().optional(),
1315
BCRYPT_SALT: z.coerce.number().int().nonnegative().or(z.string()),
14-
COMPOSE_PROJECT_NAME: z.string(),
1516
JWT_SECRET_KEY: z.string(),
1617
JWT_EXPIRATION: z.string(),
1718
PORT: z.coerce.number(),

0 commit comments

Comments
 (0)