Add docs/fly-routing.md
This commit is contained in:
parent
d764a15ba4
commit
2e376e2073
1 changed files with 50 additions and 0 deletions
50
docs/fly-routing.md
Normal file
50
docs/fly-routing.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Fly.io Edge Routing
|
||||
|
||||
Fly.io acts as the routing layer between your domain and your backend(s). During parallel migration it splits traffic between Shopify and your sovereign stack. After cutover it proxies everything to your sovereign stack.
|
||||
|
||||
**Cost:** ~$5/month.
|
||||
|
||||
---
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
curl -L https://fly.io/install.sh | sh
|
||||
flyctl auth login
|
||||
flyctl launch --copy-config --name yourstore-proxy
|
||||
flyctl secrets set SHOPIFY_ORIGIN=https://yourstore.myshopify.com
|
||||
flyctl secrets set SOVEREIGN_ORIGIN=https://yourrepl.replit.app
|
||||
flyctl secrets set SOVEREIGN_WEIGHT=0
|
||||
flyctl deploy
|
||||
```
|
||||
|
||||
Point your domain (DNS CNAME → `yourstore-proxy.fly.dev`), then add it to Fly:
|
||||
|
||||
```bash
|
||||
flyctl certs create yourstore.com
|
||||
flyctl certs create www.yourstore.com
|
||||
```
|
||||
|
||||
TLS is automatic.
|
||||
|
||||
---
|
||||
|
||||
## Traffic splitting
|
||||
|
||||
```bash
|
||||
flyctl secrets set SOVEREIGN_WEIGHT=10 # 10% sovereign
|
||||
flyctl deploy
|
||||
```
|
||||
|
||||
Ramp: 10 → 25 → 50 → 90 → 100. Each step is a ~30-second deploy.
|
||||
|
||||
---
|
||||
|
||||
## Full cutover
|
||||
|
||||
```bash
|
||||
flyctl secrets set SOVEREIGN_WEIGHT=100
|
||||
flyctl deploy
|
||||
```
|
||||
|
||||
All traffic now goes to your sovereign stack. Shopify receives nothing.
|
||||
Loading…
Add table
Reference in a new issue