-
Notifications
You must be signed in to change notification settings - Fork 4
/
env.ts
47 lines (46 loc) · 1.79 KB
/
env.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";
export const env = createEnv({
server: {
NODE_ENV: z.string().optional(),
DATABASE_URL: z.string().min(1),
DB_AUTH_TOKEN: z.string().optional(),
GOOGLE_CLIENT_ID: z.string().min(1),
GOOGLE_CLIENT_SECRET: z.string().min(1),
GITHUB_CLIENT_SECRET: z.string().min(1),
GITHUB_CLIENT_ID: z.string().min(1),
HOST_NAME: z.string().min(1),
EMAIL_FROM: z.string().min(1),
EMAIL_SERVER_HOST: z.string().min(1),
EMAIL_SERVER_PORT: z.string().min(1),
EMAIL_SERVER_USER: z.string().min(1),
EMAIL_SERVER_PASSWORD: z.string().min(1),
UMAMI_URL: z.string().min(1),
UMAMI_DATA_WEBSITE_ID: z.string().min(1),
},
client: {
NEXT_PUBLIC_APP_URL: z.string().min(1),
NEXT_PUBLIC_DOMAIN: z.string().min(1),
NEXT_PUBLIC_APP_NAME: z.string().min(1),
},
runtimeEnv: {
NODE_ENV: process.env.NODE_ENV,
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
NEXT_PUBLIC_DOMAIN: process.env.NEXT_PUBLIC_DOMAIN,
NEXT_PUBLIC_APP_NAME: process.env.NEXT_PUBLIC_APP_NAME,
DATABASE_URL: process.env.DATABASE_URL,
DB_AUTH_TOKEN: process.env.DB_AUTH_TOKEN,
GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,
GOOGLE_CLIENT_SECRET: process.env.GOOGLE_CLIENT_SECRET,
HOST_NAME: process.env.HOST_NAME,
EMAIL_SERVER_PASSWORD: process.env.EMAIL_SERVER_PASSWORD,
EMAIL_FROM: process.env.EMAIL_FROM,
EMAIL_SERVER_HOST: process.env.EMAIL_SERVER_HOST,
EMAIL_SERVER_PORT: process.env.EMAIL_SERVER_PORT,
EMAIL_SERVER_USER: process.env.EMAIL_SERVER_USER,
GITHUB_CLIENT_SECRET: process.env.GITHUB_CLIENT_SECRET,
GITHUB_CLIENT_ID: process.env.GITHUB_CLIENT_ID,
UMAMI_URL: process.env.UMAMI_URL,
UMAMI_DATA_WEBSITE_ID: process.env.UMAMI_DATA_WEBSITE_ID,
},
});