Spaces:
Running

File size: 1,015 Bytes
25834e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Local full-loop for the edge cache: the click worker's promotion action
# writes through wrangler dev's Explorer API into the LOCAL KV simulation,
# so hot URLs promote automatically during local load tests — no real
# Cloudflare account involved.
#
# Usage (see edge/spoo-edge-cache/README.md "Local dev loop"):
#   1. echo "127.0.0.1 spoo.local" | sudo tee -a /etc/hosts   # once
#   2. npx wrangler dev            # in edge/spoo-edge-cache
#   3. docker compose --profile click-events \
#        -f docker-compose.yml -f deploy/docker-compose.edge-dev.yml up -d click-worker
services:
  click-worker:
    environment:
      - EDGE_CACHE_CF_API_TOKEN=local-dev
      - EDGE_CACHE_KV_NAMESPACE_ID=edge-cache-local
      - EDGE_CACHE_API_BASE=http://host.docker.internal:8787/cdn-cgi/explorer/api
      # wrangler dev validates Host (localhost forms only) — a container
      # arriving via host.docker.internal must present localhost:8787
      - EDGE_CACHE_API_HOST_HEADER=localhost:8787