forked from placemark/placemark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv_server.ts
88 lines (83 loc) · 2.25 KB
/
env_server.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { envsafe, str, num } from "envsafe";
export const env = envsafe({
DOMAIN: str(),
/**
* The full url of the postgres database.
*
* Will likely look like postgresql://host/database
*/
DATABASE_URL: str(),
/**
* This uses Postmark
* https://postmarkapp.com/
* To send emails. This is the required token.
*/
POSTMARK_SERVER_API_TOKEN: str({ devDefault: "test", default: "off" }),
/**
* This is the stripe webhook secret, required to verify
* webhooks. You'll find it in your Stripe dashboard.
*/
/**
* This is for sending logs to Logtail. Use logtail and copy
* the API token.
*/
LOGTAIL_TOKEN: str({
default: "off",
}),
/**
* For image uploads, this is the account id.
*/
CLOUDFLARE_IMAGES_ACCOUNT_ID: str({ default: "off" }),
/**
* Same, for uploading images.
*/
CLOUDFLARE_API_TOKEN: str({ default: "off" }),
/**
* This is for showing blog posts from the val town blog.
* Probably can be removed in the OSS version:
* PRs gladly accepted!
*/
BLOG_RSS_URL: str(),
/**
* How many maps are allowed for standard accounts.
*/
WFC_QUOTA: num(),
/** How many are allowed for enterprise accounts */
WFC_QUOTA_ENTERPRISE: num(),
/**
* WorkOS details, for SAML. Find these in the WorkOS
* dashboard. This could potentially be removed from
* this OSS version: PRs gladly accepted!
*/
WORKOS_API_KEY: str({ default: "off" }),
WORKOS_CLIENT_ID: str({ default: "off" }),
WORKOS_REDIRECT_URL: str({ default: "off" }),
/**
* This is the email address where feedback emails go to.
*/
TEAM_EMAIL: str(),
/**
* GitHub details: needed for saving maps to Gists.
*/
GITHUB_CLIENT_ID: str(),
GITHUB_CLIENT_SECRET: str(),
GITHUB_ISSUES_TOKEN: str({
devDefault: "_",
}),
});
if (env.WORKOS_API_KEY === "off") {
// eslint-disable-next-line
console.log("Disabling WorkOS integration");
}
if (env.LOGTAIL_TOKEN === "off") {
// eslint-disable-next-line
console.log("Disabling Logtail integration");
}
if (env.CLOUDFLARE_API_TOKEN === "off") {
// eslint-disable-next-line
console.log("Disabling Cloudflare integration");
}
if (env.POSTMARK_SERVER_API_TOKEN === "off") {
// eslint-disable-next-line
console.log("Disabling Postmark integration");
}