-
Notifications
You must be signed in to change notification settings - Fork 10
/
wrangler.toml
125 lines (104 loc) · 3.32 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#:schema node_modules/wrangler/config-schema.json
# -- Compability
compatibility_date = "2024-07-22"
compatibility_flags = ["nodejs_compat"]
# -- Project configs
account_id = "f6eb193c5ada002251ec96253583e74d"
main = "src/entry.ts"
workers_dev = false
minify = true
# -- Smart placement
[placement]
mode = "smart"
# -- Static files
[site]
bucket = "../site/dist"
####################################################################################################
# -- PRODUCTION --
[env.prod]
name = "kesim"
# -- Routes
routes = [
{pattern="kes.im", custom_domain=true},
{pattern="api.kes.im", custom_domain=true},
]
# -- KV Bindings
kv_namespaces = [
{binding="KV_LINKS", id="767fc2258dd94aa09ddcacdac19b1e23"}
]
# -- D1 Bindings
d1_databases = [
{binding="D1_LINKS", database_name="kesim", database_id="7356670a-5a76-414d-b8e0-92c30ed0f743" }
]
# -- Limiter Bindings
[[env.prod.unsafe.bindings]]
name = "API_RATE_LIMITER"
type = "ratelimit"
namespace_id = "2000001" # an number identifier, unique to your account
simple = {limit = 3, period = 10} # [limit, # of access per] [period, 10 or 60 (seconds)]
# -- ENV vars
[env.prod.vars]
ENV = "prod"
DEBUG_MODE = true
CFG_SITE_ORIGIN = "https://kes.im"
CFG_SITE_HOSTNAME = "kes.im"
CFG_SITE_API_ORIGIN = "https://api.kes.im"
CFG_SITE_API_HOSTNAME = "api.kes.im"
CFG_REDIR_ORIGIN = "https://kes.im"
CFG_REDIR_HOSTNAME = "kes.im"
CFG_RANDOM_SLUG_LENGTH = 5
CFG_MIN_SLUG_LENGTH = 3
CFG_MAX_SLUG_LENGTH = 64
CFG_MIN_URL_LENGTH = 10
CFG_MAX_URL_LENGTH = 2048
CFG_DEFAULT_CACHE_AGE = 3600 # an hour
CFG_DEFAULT_STATIC_CACHE_AGE = 86400 # a day
CFG_HASHED_STATIC_CACHE_AGE = 31536000 # a year
CFG_REDIRECT_CACHE_AGE = 31536000 # a year
CF_STATIC_ASSET_TTL = 172800 # 2 days
CF_KV_CACHE_TTL = 86400 # a day
CF_TURNSTILE_ENABLED = true
CF_TURNSTILE_VERIFY_URL = "https://challenges.cloudflare.com/turnstile/v0/siteverify"
####################################################################################################
####################################################################################################
# -- LOCAL --
[env.local]
name = "kesim-local"
# -- KV Bindings
kv_namespaces = [
{binding="KV_LINKS", id="767fc2258dd94aa09ddcacdac19b1e23"}
]
# -- D1 Bindings
d1_databases = [
{binding="D1_LINKS", database_name="kesim", database_id="7356670a-5a76-414d-b8e0-92c30ed0f743" }
]
# -- Limiter Bindings
[[env.local.unsafe.bindings]]
name = "API_RATE_LIMITER"
type = "ratelimit"
namespace_id = "2000001" # an number identifier, unique to your account
simple = {limit = 3, period = 10} # [limit, # of access per] [period, 10 or 60 (seconds)]
# -- ENV vars
[env.local.vars]
ENV = "local"
DEBUG_MODE = true
CFG_SITE_ORIGIN = "https://local.kes.im:5000"
CFG_SITE_HOSTNAME = "local.kes.im"
CFG_SITE_API_ORIGIN = "https://api.local.kes.im:3000"
CFG_SITE_API_HOSTNAME = "api.local.kes.im"
CFG_REDIR_ORIGIN = "https://local.kes.im:3000"
CFG_REDIR_HOSTNAME = "local.kes.im"
CFG_RANDOM_SLUG_LENGTH = 5
CFG_MIN_SLUG_LENGTH = 3
CFG_MAX_SLUG_LENGTH = 64
CFG_MIN_URL_LENGTH = 10
CFG_MAX_URL_LENGTH = 2048
CFG_DEFAULT_CACHE_AGE = 0
CFG_DEFAULT_STATIC_CACHE_AGE = 0
CFG_HASHED_STATIC_CACHE_AGE = 0
CFG_REDIRECT_CACHE_AGE = 0
CF_STATIC_ASSET_TTL = 0
CF_KV_CACHE_TTL = 60
CF_TURNSTILE_ENABLED = false
CF_TURNSTILE_VERIFY_URL = ""
####################################################################################################