-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.toml.template
More file actions
106 lines (93 loc) · 3.07 KB
/
Copy pathwrangler.toml.template
File metadata and controls
106 lines (93 loc) · 3.07 KB
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
name = "face-gen-api"
main = "src/index.ts"
compatibility_date = "2024-01-01"
compatibility_flags = ["nodejs_compat"]
# Worker configuration
[build]
command = "npm run build"
# Development environment
[env.development]
name = "face-gen-api-dev"
[env.development.vars]
ENVIRONMENT = "development"
APPWRITE_ENDPOINT = "YOUR_APPWRITE_ENDPOINT"
APPWRITE_DATABASE_ID = "YOUR_DATABASE_ID"
APPWRITE_COLLECTION_ID = "YOUR_COLLECTION_ID"
APPWRITE_BUCKET_ID = "YOUR_BUCKET_ID"
RATE_LIMIT_PER_MINUTE = "100"
RATE_LIMIT_PER_HOUR = "1000"
CACHE_TTL_SUCCESS = "3600"
CACHE_TTL_ERROR = "300"
CIRCUIT_BREAKER_THRESHOLD = "5"
CIRCUIT_BREAKER_TIMEOUT = "30000"
LOG_LEVEL = "debug"
IMAGE_SERVICE_URL = "https://avatar-generation-production.avatar-api.workers.dev/generate"
IMAGE_SERVICE_KEY = "YOUR_IMAGE_SERVICE_KEY"
VECTOR_SEARCH_LIMIT = "10"
VECTOR_SEARCH_THRESHOLD = "0.7"
VECTOR_SEARCH_INCLUDE_METADATA = "true"
# Staging environment
[env.staging]
name = "face-gen-api-staging"
[env.staging.vars]
ENVIRONMENT = "staging"
APPWRITE_ENDPOINT = "YOUR_APPWRITE_ENDPOINT"
APPWRITE_DATABASE_ID = "YOUR_DATABASE_ID"
APPWRITE_COLLECTION_ID = "YOUR_COLLECTION_ID"
APPWRITE_BUCKET_ID = "YOUR_BUCKET_ID"
RATE_LIMIT_PER_MINUTE = "100"
RATE_LIMIT_PER_HOUR = "1000"
CACHE_TTL_SUCCESS = "3600"
CACHE_TTL_ERROR = "300"
CIRCUIT_BREAKER_THRESHOLD = "5"
CIRCUIT_BREAKER_TIMEOUT = "30000"
LOG_LEVEL = "info"
IMAGE_SERVICE_URL = "https://avatar-generation-production.avatar-api.workers.dev/generate"
VECTOR_SEARCH_LIMIT = "10"
VECTOR_SEARCH_THRESHOLD = "0.7"
VECTOR_SEARCH_INCLUDE_METADATA = "true"
# Production environment
[env.production]
name = "face-gen-api"
[env.production.vars]
ENVIRONMENT = "production"
APPWRITE_ENDPOINT = "YOUR_APPWRITE_ENDPOINT"
APPWRITE_DATABASE_ID = "YOUR_DATABASE_ID"
APPWRITE_COLLECTION_ID = "YOUR_COLLECTION_ID"
APPWRITE_BUCKET_ID = "YOUR_BUCKET_ID"
RATE_LIMIT_PER_MINUTE = "100"
RATE_LIMIT_PER_HOUR = "1000"
CACHE_TTL_SUCCESS = "3600"
CACHE_TTL_ERROR = "300"
CIRCUIT_BREAKER_THRESHOLD = "5"
CIRCUIT_BREAKER_TIMEOUT = "30000"
LOG_LEVEL = "info"
IMAGE_SERVICE_URL = "https://avatar-generation-production.avatar-api.workers.dev/generate"
VECTOR_SEARCH_LIMIT = "10"
VECTOR_SEARCH_THRESHOLD = "0.7"
VECTOR_SEARCH_INCLUDE_METADATA = "true"
# KV namespace for rate limiting - Development
[[env.development.kv_namespaces]]
binding = "RATE_LIMIT"
id = "YOUR_DEV_KV_NAMESPACE_ID"
preview_id = "YOUR_DEV_PREVIEW_KV_NAMESPACE_ID"
# KV namespace for rate limiting - Staging
[[env.staging.kv_namespaces]]
binding = "RATE_LIMIT"
id = "YOUR_STAGING_KV_NAMESPACE_ID"
preview_id = "YOUR_STAGING_PREVIEW_KV_NAMESPACE_ID"
# KV namespace for rate limiting - Production
[[env.production.kv_namespaces]]
binding = "RATE_LIMIT"
id = "YOUR_PRODUCTION_KV_NAMESPACE_ID"
preview_id = "YOUR_PRODUCTION_PREVIEW_KV_NAMESPACE_ID"
# Secrets (set via wrangler secret put)
# Required secrets for all environments:
# - APPWRITE_PROJECT_ID
# - APPWRITE_API_KEY
# Optional secrets for enhanced security:
# - CORS_ALLOWED_ORIGINS (comma-separated list)
# - API_KEY_HEADER_NAME (custom header for API key auth)
# Analytics and monitoring
[observability]
enabled = true