forked from serverless-dns/serverless-dns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrangler.toml
89 lines (81 loc) · 2.11 KB
/
wrangler.toml
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
89
name = "serverless-dns"
main = "./dist/worker.js"
workers_dev = true
# logpush job is setup to capture from envs ending: log, pro, or one
logpush = false
# use node_compat or custom build
# node_compat = true
compatibility_date = "2023-03-21"
send_metrics = false
minify = false
# uncomment to enable analytics on serverless-dns
# this binding is not inherited by other worker-envs
#analytics_engine_datasets = [
# { binding = "METRICS", dataset = "SDNS_M0" },
# { binding = "BL_METRICS", dataset = "SDNS_BL0" }
#]
[build]
command = "npm run build"
[[rules]]
type = "ESModule"
globs = ["**/*.js"]
[vars]
LOG_LEVEL = "debug"
WORKER_ENV = "development"
CLOUD_PLATFORM = "cloudflare"
##################
#------PROD------#
##################
# wrangler doesn't yet support Workers Services and the new "Environments"
# github.com/cloudflare/cloudflare-docs/pull/3175/files
# github.com/cloudflare/wrangler2/issues/27
# developers.cloudflare.com/workers/platform/environments
[env.prod]
name = "basic-unbound"
minify = true
routes = [
"sky.rethinkdns.com/*",
"sky.bravedns.com/*",
"basic.rethinkdns.com/*",
"basic.bravedns.com/*",
"free.bravedns.com/*",
]
# vars are not inherited
# workers/platform/environment-variables#environment-variables-via-wrangler
[env.prod.vars]
LOG_LEVEL = "info"
WORKER_ENV = "production"
CLOUD_PLATFORM = "cloudflare"
##################
#------ONE-------#
##################
[env.one]
name = "dns-one"
logpush = true
minify = true
routes = [
"one.rethinkdns.com/*",
"one.bravedns.com/*",
]
analytics_engine_datasets = [
{ binding = "METRICS", dataset = "ONE_M0" },
{ binding = "BL_METRICS", dataset = "ONE_BL0" }
]
[env.one.vars]
# just the error and request logs
LOG_LEVEL = "logpush"
WORKER_ENV = "production"
CLOUD_PLATFORM = "cloudflare"
CF_LOGPUSH_R2_PATH = "qlog/"
##################
#-----SECRETS----#
##################
# only for documentation purposes
# developers.cloudflare.com/workers/platform/environment-variables/#adding-secrets-via-wrangler
# [secrets]
# GW_IP4 = ""
# GW_IP6 = ""
# CF_ACCOUNT_ID = ""
# CF_API_TOKEN = ""
# CF_LOGPUSH_R2_SECRET_KEY = ""
# CF_LOGPUSH_R2_ACCESS_KEY = ""