From 1c7f107c23c0f7aae95ae6324ea1da094dda17aa Mon Sep 17 00:00:00 2001 From: Vargha Csongor Date: Sat, 15 Mar 2025 11:06:58 +0100 Subject: [PATCH] add wrangler config --- app/wrangler.jsonc | 48 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/app/wrangler.jsonc b/app/wrangler.jsonc index 306117a..46f8c7b 100644 --- a/app/wrangler.jsonc +++ b/app/wrangler.jsonc @@ -4,7 +4,7 @@ */ { "$schema": "node_modules/wrangler/config-schema.json", - "name": "app", + "name": "generations-heritage", "compatibility_flags": [ "nodejs_compat" ], @@ -12,39 +12,71 @@ "pages_build_output_dir": ".svelte-kit/cloudflare", "observability": { "enabled": true - } + }, /** * Smart Placement * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement */ - // "placement": { "mode": "smart" }, - + "placement": { + "mode": "smart" + }, /** * Bindings * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including * databases, object storage, AI inference, real-time communication and more. * https://developers.cloudflare.com/workers/runtime-apis/bindings/ */ - /** * Environment Variables * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables */ // "vars": { "MY_VARIABLE": "production_value" }, + "env": { + "staging": { + "name": "generations-heritage-stage", + "route": "https://ghstage.varghacsongor.hu/*", + "kv_namespaces": [ + { + "binding": "GH_SESSIONS", + "id": "6f793c8813ab46549234572f4c6ae5a1" + } + ], + "r2_buckets": [ + { + "binding": "GH_MEDIA", + "bucket_name": "ghstaging" + } + ] + }, + "production": { + "name": "generations-heritage-prod", + "route": "https://csalad.varghacsongor.hu/*", + "kv_namespaces": [ + { + "binding": "GH_SESSIONS", + "id": "4cedee65c36d49d7afc654bcc798d169" + } + ], + "r2_buckets": [ + { + "binding": "GH_MEDIA", + "bucket_name": "generations-heritage" + } + ] + } + } /** * Note: Use secrets to store sensitive data. * https://developers.cloudflare.com/workers/configuration/secrets/ */ - /** * Static Assets * https://developers.cloudflare.com/workers/static-assets/binding/ */ // "assets": { "directory": "./public/", "binding": "ASSETS" }, - /** * Service Bindings (communicate between multiple Workers) * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings */ // "services": [{ "binding": "MY_SERVICE", "service": "my-service" }] -} +} \ No newline at end of file