Deploy
One command takes the family live on Sprites, this site live on Cloudflare, and the code to GitHub.
2 min readUpdated
What goes where
| Part | Hosted on | Deployed by |
|---|---|---|
| The and the live-family site | Fly.io (probate-courthouse) | scripts/deploy.py |
| Fly.io Sprites, created by the Courthouse | the Courthouse itself | |
| This landing page and docs | Cloudflare (static assets on Workers) | wrangler deploy in apps/site |
| The code | GitHub | scripts/ship.sh |

Before the first deploy
Sign in to the three CLIs once:
gh auth login
npx wrangler loginGet a Sprites API token from the Sprites dashboard.
Connect the services in the Sprites dashboard under : TypeSafe (), AgentMail, Box, Pinecone, Ollama, Apify and, as a fallback brain, Anthropic. Note each connection ID.
Create three AgentMail inboxes: the family's, and the friend and stranger test senders. The owner's own test emails leave from harsh@dualmindlab.tech through Cloudflare Email Service: turn it on for the domain, verify the family inbox as a destination, and add a Custom API connector named cloudflare for https://api.cloudflare.com.
Fill in the config (both files are gitignored):
cp services/core/.env.example services/core/.env
cp config/owner.example.yaml config/owner.yamlSee Configuration for every value.
Check it without changing anything:
make deploy-checkShip
make shipIn order, it:
- checks that no secret is tracked by git or looks like a committed key;
- runs the Python tests and lint;
- builds both websites and commits anything left over;
- creates the public GitHub repository if needed and pushes
main; - deploys the Courthouse to Sprites and waits for
/healthz; - builds this site with the live URL and repository filled in, and deploys it to Cloudflare.
Every step is safe to re-run. Steps 5 and 6 are skipped, with a note, if .env is missing or you haven't signed in to Wrangler.
Deploying the parts on their own
make deploy # just the Courthouse
make site-deploy # just this site (needs `npx wrangler login`)How the Courthouse deploy works
scripts/deploy.py creates the Sprite if it isn't there, uploads the code bundle (Python service, config and the built live site), installs it, writes .env with live settings (PROBATE_FAKE=0, the clock on, data in /home/sprite/data), registers the courthouse service on port 8080, restarts it, makes the URL public and waits for /healthz. The database is outside the code folder, so redeploys keep the family.
Checked against a mock, not yet against Sprites
The deploy script has been run end to end against a mock of the Sprites API, and the install has been run on a clean Ubuntu home. The first real run confirms the exec response shape; if an install fails silently, run sprite exec -s probate-courthouse -- python3 -c "import probate".
Last updated on