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
# Fly.io app config for wire-relay-server.
#
# Deploy:
# fly launch --no-deploy # first time: creates the app
# fly volumes create relay_state \
# --size 1 --region iad # 1 GB persistent volume; wire-state lives here
# fly deploy # build + push + roll
# fly status # health
#
# Cutover:
# In Cloudflare DNS for wireup.net:
# - CNAME relay → <app>.fly.dev (proxied / orange-cloud for DDoS + caching)
# - CNAME @ (apex) → <app>.fly.dev OR keep apex on CF Pages for landing
# Then point new clients at `https://relay.wireup.net` and let DNS
# propagation drain old wireup.net traffic from Spark cloudflared tunnel.
#
# Pre-launch sanity:
# curl https://<app>.fly.dev/healthz # → ok
# curl https://<app>.fly.dev/.well-known/agent-card.json?handle=test # → 404 fine
#
# Cost @ v0.5 scale: $0 on Fly hobby plan (shared-cpu-1x 256MB + 1 GB volume covered).
# Bump memory / region count when you outgrow it.
= "wireup-relay"
= "iad" # change if your CF edge sits elsewhere (sjc / fra / etc.)
[]
# Empty — Fly uses the repo-root Dockerfile.
[]
# wire-relay-server reads WIRE_HOME for slot state. Already set in the
# Dockerfile, but re-stating here keeps Fly's config the single source
# of truth for environment.
= "/data"
= "wire=info"
[]
= 8770
= true
# SSE / streaming: never auto-stop machines while subscribers are
# connected. min_machines_running = 1 keeps the relay warm.
= false
= true
= 1
# Long timeouts so SSE keepalives don't disconnect.
# (Fly's default 60s idle timeout would kill our 30s-keepalive streams.)
[]
= "requests"
= 200
= 250
[[]]
= "relay_state"
= "/data"
# initial_size only applies on first attach; resize later with `fly volumes extend`.
= "1gb"
[[]]
= "shared-cpu-1x"
= "256mb"
= 1
# Bump to "shared-cpu-2x" + 512mb when SSE subscriber count >100.
[]
[]
= "http"
= 8770
= "/healthz"
= "15s"
= "5s"
= "10s"
= "GET"