-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathenv.mjs
68 lines (67 loc) · 2.75 KB
/
env.mjs
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";
export const env = createEnv({
server: {
// This is optional because it's only used in development.
// See https://next-auth.js.org/deployment.
NEXTAUTH_URL: z.string().url().optional(),
NEXTAUTH_SECRET: z.string().min(1),
DATABASE_URL: z.string().min(1),
SMTP_FROM: z.string().min(1),
SMTP_HOST: z.string().min(1),
SMTP_PORT: z.string().min(1),
SMTP_USER: z.string().min(1),
SMTP_PASSWORD: z.string().min(1),
SMTP_SECURE_ENABLED: z.enum("0", "1").optional(),
GITHUB_APP_ID: z.string().min(1),
GITHUB_APP_CLIENT_ID: z.string().min(1),
GITHUB_APP_CLIENT_SECRET: z.string().min(1),
GITHUB_APP_WEBHOOK_SECRET: z.string().min(1).optional(),
GITHUB_APP_PRIVATE_KEY: z.string().min(1).optional(),
GITHUB_APP_SLUG: z.string().min(1),
GITHUB_APP_ACCESS_TOKEN: z.string().min(1),
S3_BUCKET_NAME: z.string(),
S3_REGION: z.string(),
S3_ACCESS_KEY: z.string(),
S3_SECRET_KEY: z.string(),
WEBAPP_URL: z.string().url().optional(),
VERCEL_URL: z.string().optional(),
TREMENDOUS_API_KEY: z.string().min(1),
TREMENDOUS_CAMPAIGN_ID: z.string().min(1),
DISCORD_BOT_TOKEN: z.string(),
DISCORD_CHANNEL_ID: z.string(),
},
client: {
NEXT_PUBLIC_APP_URL: z.string().min(1),
// NEXT_PUBLIC_TRIGGER_PUBLIC_API_KEY: z.string().min(1).optional(),
},
runtimeEnv: {
NEXTAUTH_URL: process.env.NEXTAUTH_URL,
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
DATABASE_URL: process.env.DATABASE_URL,
SMTP_FROM: process.env.SMTP_FROM,
SMTP_HOST: process.env.SMTP_HOST,
SMTP_PORT: process.env.SMTP_PORT,
SMTP_USER: process.env.SMTP_USER,
SMTP_PASSWORD: process.env.SMTP_PASSWORD,
SMTP_SECURE_ENABLED: process.env.SMTP_SECURE_ENABLED,
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
GITHUB_APP_ID: process.env.GITHUB_APP_ID,
GITHUB_APP_CLIENT_ID: process.env.GITHUB_APP_CLIENT_ID,
GITHUB_APP_CLIENT_SECRET: process.env.GITHUB_APP_CLIENT_SECRET,
GITHUB_APP_WEBHOOK_SECRET: process.env.GITHUB_APP_WEBHOOK_SECRET,
GITHUB_APP_PRIVATE_KEY: process.env.GITHUB_APP_PRIVATE_KEY,
GITHUB_APP_SLUG: process.env.GITHUB_APP_SLUG,
GITHUB_APP_ACCESS_TOKEN: process.env.GITHUB_APP_ACCESS_TOKEN,
S3_ACCESS_KEY: process.env.S3_ACCESS_KEY,
S3_BUCKET_NAME: process.env.S3_BUCKET_NAME,
S3_REGION: process.env.S3_REGION,
S3_SECRET_KEY: process.env.S3_SECRET_KEY,
WEBAPP_URL: process.env.WEBAPP_URL,
VERCEL_URL: process.env.VERCEL_URL,
TREMENDOUS_API_KEY: process.env.TREMENDOUS_API_KEY,
TREMENDOUS_CAMPAIGN_ID: process.env.TREMENDOUS_CAMPAIGN_ID,
DISCORD_BOT_TOKEN: process.env.DISCORD_BOT_TOKEN,
DISCORD_CHANNEL_ID: process.env.DISCORD_CHANNEL_ID,
},
});