/
wrangler.toml
154 lines (134 loc) 路 5.06 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# nftstorage.link wrangler config.
name = "gateway-nft-storage"
# `javascript` means our we'll send pre-built javascript code.
# ...as opposed to `webpack` where wrangler builds our code for us.
type = "javascript"
account_id = ""
watch_dir = "src"
compatibility_date = "2021-12-03"
[build]
command = "npm run build"
[build.upload]
format = "modules"
dir = "dist"
main = "worker.mjs"
[durable_objects]
bindings = [
{name = "GATEWAYMETRICS", class_name = "GatewayMetrics0"},
{name = "SUMMARYMETRICS", class_name = "SummaryMetrics1"},
{name = "CIDSTRACKER", class_name = "CidsTracker0"},
{name = "GATEWAYREDIRECTCOUNTER", class_name = "GatewayRedirectCounter0"}
]
# PROD!
[env.production]
# name = "gateway-nft-storage-production"
account_id = "fffa4b4363a7e5250af8357087263b3a" # Protocol Labs CF account
zone_id = "c7795a0adce7609a95d62fec04705aff" # nftstorage.link zone
route = "*.ipfs.nftstorage.link/*"
kv_namespaces = [{ binding = "DENYLIST", id = "785cf627e913468ca5319523ae929def" }]
[env.production.vars]
IPFS_GATEWAYS = "[\"https://ipfs.io\", \"https://cf.nftstorage.link\", \"https://pinata.nftstorage.link\"]"
GATEWAY_HOSTNAME = 'ipfs.nftstorage.link'
DATABASE_URL = "https://nft-storage-pgrest-prod.herokuapp.com"
DEBUG = "false"
ENV = "production"
[env.production.durable_objects]
bindings = [
{name = "GATEWAYMETRICS", class_name = "GatewayMetrics0"},
{name = "SUMMARYMETRICS", class_name = "SummaryMetrics1"},
{name = "CIDSTRACKER", class_name = "CidsTracker0"},
{name = "GATEWAYREDIRECTCOUNTER", class_name = "GatewayRedirectCounter0"}
]
# Staging!
[env.staging]
# name = "gateway-nft-storage-staging"
account_id = "fffa4b4363a7e5250af8357087263b3a" # Protocol Labs CF account
zone_id = "c7795a0adce7609a95d62fec04705aff" # nftstorage.link zone
route = "*.ipfs-staging.nftstorage.link/*"
kv_namespaces = [{ binding = "DENYLIST", id = "f4eb0eca32e14e28b643604a82e00cb3" }]
[env.staging.vars]
IPFS_GATEWAYS = "[\"https://ipfs.io\", \"https://cf.nftstorage.link\", \"https://pinata.nftstorage.link\"]"
GATEWAY_HOSTNAME = 'ipfs-staging.nftstorage.link'
DATABASE_URL = "https://nft-storage-pgrest-staging.herokuapp.com"
DEBUG = "true"
ENV = "staging"
[env.staging.durable_objects]
bindings = [
{name = "GATEWAYMETRICS", class_name = "GatewayMetrics0"},
{name = "SUMMARYMETRICS", class_name = "SummaryMetrics1"},
{name = "CIDSTRACKER", class_name = "CidsTracker0"},
{name = "GATEWAYREDIRECTCOUNTER", class_name = "GatewayRedirectCounter0"}
]
# Test!
[env.test]
workers_dev = true
kv_namespaces = [{ binding = "DENYLIST" }]
[env.test.vars]
IPFS_GATEWAYS = "[\"http://127.0.0.1:9081\", \"http://localhost:9082\", \"http://localhost:9083\"]"
GATEWAY_HOSTNAME = 'ipfs.localhost:8787'
DEBUG = "true"
ENV = "test"
[env.test.durable_objects]
bindings = [
{name = "GATEWAYMETRICS", class_name = "GatewayMetrics0"},
{name = "SUMMARYMETRICS", class_name = "SummaryMetrics1"},
{name = "CIDSTRACKER", class_name = "CidsTracker0"},
{name = "GATEWAYREDIRECTCOUNTER", class_name = "GatewayRedirectCounter0"}
]
# Dev!
[env.vsantos]
workers_dev = true
account_id = "7ec0b7cf2ec201b2580374e53ba5f37b"
kv_namespaces = [{ binding = "DENYLIST", id = "" }]
[env.vsantos.vars]
GATEWAY_HOSTNAME = 'ipfs.localhost:8787'
IPFS_GATEWAYS = "[\"https://ipfs.io\"]"
[env.vsantos.durable_objects]
bindings = [
{name = "GATEWAYMETRICS", class_name = "GatewayMetrics0"},
{name = "SUMMARYMETRICS", class_name = "SummaryMetrics1"},
{name = "CIDSTRACKER", class_name = "CidsTracker0"},
{name = "GATEWAYREDIRECTCOUNTER", class_name = "GatewayRedirectCounter0"}
]
[env.alanshaw]
workers_dev = true
account_id = "4fe12d085474d33bdcfd8e9bed4d8f95"
kv_namespaces = [{ binding = "DENYLIST", id = "4ecfe1eb8f634ef9846d52601ff5fd20", preview_id = "4ecfe1eb8f634ef9846d52601ff5fd20" }]
[env.alanshaw.vars]
GATEWAY_HOSTNAME = 'ipfs.localhost:8787'
IPFS_GATEWAYS = "[\"https://ipfs.io\"]"
[env.alanshaw.durable_objects]
bindings = [
{name = "GATEWAYMETRICS", class_name = "GatewayMetrics0"},
{name = "SUMMARYMETRICS", class_name = "SummaryMetrics1"},
{name = "CIDSTRACKER", class_name = "CidsTracker0"},
{name = "GATEWAYREDIRECTCOUNTER", class_name = "GatewayRedirectCounter0"}
]
[[migrations]]
tag = "v1" # Should be unique for each entry
new_classes = ["GatewayMetrics0", "SummaryMetrics0", "CidsTracker0", "GatewayRateLimits0", "GatewayRedirectCounter0"]
[[migrations]]
tag = "v2" # Should be unique for each entry
renamed_classes = [
{from="GatewayRateLimits0", to="GatewayRateLimits1"}
]
[[migrations]]
tag = "v3" # Should be unique for each entry
renamed_classes = [
{from="GatewayRateLimits1", to="GatewayRateLimits2"}
]
[[migrations]]
tag = "v4" # Should be unique for each entry
new_classes = ["GatewayRateLimits3"]
deleted_classes = ["GatewayRateLimits2"]
[[migrations]]
tag = "v5" # Should be unique for each entry
new_classes = ["GatewayRateLimits4"]
deleted_classes = ["GatewayRateLimits3"]
[[migrations]]
tag = "v6" # Should be unique for each entry
deleted_classes = ["GatewayRateLimits4"]
[[migrations]]
tag = "v7" # Should be unique for each entry
new_classes = ["SummaryMetrics1"]
deleted_classes = ["SummaryMetrics0"]