Files
blastr/wrangler.toml
Tony Giorgio 71dc2becac Staging
2023-06-16 12:00:44 -05:00

176 lines
4.8 KiB
TOML

name = "blastr"
main = "build/worker/shim.mjs"
compatibility_date = "2022-01-20"
# replace with your domain info - TODO this might not be required but we added it for ours.
routes = [
{ pattern = "nostr.mutinywallet.com/", zone_id = "2b9268714ce8d1c4431e8046d4ba55d3" },
{ pattern = "nostr.mutinywallet.com/event", zone_id = "2b9268714ce8d1c4431e8046d4ba55d3" }
]
# replace with your KV store info
# create the queues with `wrangler kv:namespace create PUBLISHED_NOTES` and the same command with the `--preview` flag.
# put your queue IDs below
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]
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}`
# TODO make these more dynamic
[[queues.producers]]
queue = "nostr-events-pub-1-b"
binding = "nostr-events-pub-1-b"
[[queues.producers]]
queue = "nostr-events-pub-2-b"
binding = "nostr-events-pub-2-b"
[[queues.producers]]
queue = "nostr-events-pub-3-b"
binding = "nostr-events-pub-3-b"
[[queues.producers]]
queue = "nostr-events-pub-4-b"
binding = "nostr-events-pub-4-b"
[[queues.producers]]
queue = "nostr-events-pub-5-b"
binding = "nostr-events-pub-5-b"
[[queues.producers]]
queue = "nostr-events-pub-6-b"
binding = "nostr-events-pub-6-b"
[[queues.producers]]
queue = "nostr-events-pub-7-b"
binding = "nostr-events-pub-7-b"
[[queues.producers]]
queue = "nostr-events-pub-8-b"
binding = "nostr-events-pub-8-b"
[[queues.producers]]
queue = "nostr-events-pub-9-b"
binding = "nostr-events-pub-9-b"
[[queues.producers]]
queue = "nostr-events-pub-10-b"
binding = "nostr-events-pub-10-b"
# consumers
[[queues.consumers]]
queue = "nostr-events-pub-1-b"
max_batch_size = 100
max_batch_timeout = 5 # this is the best one, run quicker
[[queues.consumers]]
queue = "nostr-events-pub-2-b"
max_batch_size = 100
max_batch_timeout = 15
[[queues.consumers]]
queue = "nostr-events-pub-3-b"
max_batch_size = 100
max_batch_timeout = 15
[[queues.consumers]]
queue = "nostr-events-pub-4-b"
max_batch_size = 100
max_batch_timeout = 15
[[queues.consumers]]
queue = "nostr-events-pub-5-b"
max_batch_size = 100
max_batch_timeout = 15
[[queues.consumers]]
queue = "nostr-events-pub-6-b"
max_batch_size = 100
max_batch_timeout = 15
[[queues.consumers]]
queue = "nostr-events-pub-7-b"
max_batch_size = 100
max_batch_timeout = 15
[[queues.consumers]]
queue = "nostr-events-pub-8-b"
max_batch_size = 100
max_batch_timeout = 15
[[queues.consumers]]
queue = "nostr-events-pub-9-b"
max_batch_size = 100
max_batch_timeout = 15
[[queues.consumers]]
queue = "nostr-events-pub-10-b"
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"