mirror of
https://github.com/aljazceru/blastr.git
synced 2025-12-17 22:14:20 +01:00
@@ -31,6 +31,14 @@ $ npm run dev
|
||||
$ npm run deploy
|
||||
```
|
||||
|
||||
## Staging
|
||||
|
||||
Production deployments happen automatically but staging is manually for now. Deploy whenever you need to test changes before merging to master.
|
||||
|
||||
```
|
||||
wrangler publish --env staging
|
||||
```
|
||||
|
||||
### Setup
|
||||
|
||||
There's a few cloudflare components that Blastr uses behind the scenes, namely a KV store and multiple queues to distribute the load.
|
||||
|
||||
@@ -17,8 +17,25 @@ kv_namespaces = [
|
||||
{ binding = "NWC_RESPONSES", id = "5b434d5eced84abaad1c9a44448ac71c", preview_id = "af27b55b58754562b4250dcd3682547b" },
|
||||
]
|
||||
|
||||
[env.staging]
|
||||
name = "blastr-staging"
|
||||
routes = [
|
||||
{ pattern = "nostr-staging.mutinywallet.com/", zone_id = "2b9268714ce8d1c4431e8046d4ba55d3" },
|
||||
{ pattern = "nostr-staging.mutinywallet.com/event", zone_id = "2b9268714ce8d1c4431e8046d4ba55d3" }
|
||||
]
|
||||
kv_namespaces = [
|
||||
{ binding = "PUBLISHED_NOTES", id = "afa24a392a5a41f6b1655507dfd9b97a", preview_id = "0b334aece8d74c3ab90e3e99db569ce8" },
|
||||
{ binding = "NWC_REQUESTS", id = "e5bd788ddc16410bb108df0f2ae89e62", preview_id = "63d99f551a464ff78bbbbee7113cb658" },
|
||||
{ binding = "NWC_RESPONSES", id = "5b434d5eced84abaad1c9a44448ac71c", preview_id = "af27b55b58754562b4250dcd3682547b" },
|
||||
]
|
||||
|
||||
[env.staging.vars]
|
||||
WORKERS_RS_VERSION = "0.0.13"
|
||||
ENVIRONMENT = "staging"
|
||||
|
||||
[vars]
|
||||
WORKERS_RS_VERSION = "0.0.13"
|
||||
ENVIRONMENT = "production"
|
||||
|
||||
# Replace with all the queues you created, if you named them different.
|
||||
# create the queues with: `wrangler queues create {NAME}`
|
||||
@@ -114,5 +131,45 @@ WORKERS_RS_VERSION = "0.0.13"
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 15
|
||||
|
||||
[[env.staging.queues.producers]]
|
||||
queue = "nostr-events-pub-1-b"
|
||||
binding = "nostr-events-pub-1-b"
|
||||
|
||||
[[env.staging.queues.producers]]
|
||||
queue = "nostr-events-pub-2-b"
|
||||
binding = "nostr-events-pub-2-b"
|
||||
|
||||
[[env.staging.queues.producers]]
|
||||
queue = "nostr-events-pub-3-b"
|
||||
binding = "nostr-events-pub-3-b"
|
||||
|
||||
[[env.staging.queues.producers]]
|
||||
queue = "nostr-events-pub-4-b"
|
||||
binding = "nostr-events-pub-4-b"
|
||||
|
||||
[[env.staging.queues.producers]]
|
||||
queue = "nostr-events-pub-5-b"
|
||||
binding = "nostr-events-pub-5-b"
|
||||
|
||||
[[env.staging.queues.producers]]
|
||||
queue = "nostr-events-pub-6-b"
|
||||
binding = "nostr-events-pub-6-b"
|
||||
|
||||
[[env.staging.queues.producers]]
|
||||
queue = "nostr-events-pub-7-b"
|
||||
binding = "nostr-events-pub-7-b"
|
||||
|
||||
[[env.staging.queues.producers]]
|
||||
queue = "nostr-events-pub-8-b"
|
||||
binding = "nostr-events-pub-8-b"
|
||||
|
||||
[[env.staging.queues.producers]]
|
||||
queue = "nostr-events-pub-9-b"
|
||||
binding = "nostr-events-pub-9-b"
|
||||
|
||||
[[env.staging.queues.producers]]
|
||||
queue = "nostr-events-pub-10-b"
|
||||
binding = "nostr-events-pub-10-b"
|
||||
|
||||
[build]
|
||||
command = "cargo install -q worker-build --version 0.0.9 && worker-build --release"
|
||||
|
||||
Reference in New Issue
Block a user