How it works
What orbitpush does on bunny.net during a deploy, and which edge rules and hostnames it manages.
orbitpush keeps no state of its own. Everything it needs is in orbitpush.json in your repository and in the zones in your bunny.net account, so any machine with the file and an API key can deploy.
The deploy, step by step
- Reads
orbitpush.jsonandBUNNY_API_KEY. - Compares the output directory with the storage zone using SHA256 checksums and uploads only the files that changed. HTML files are uploaded last, so a new page never links to an asset that is not there yet.
- Applies the settings: SPA mode or the 404 page, and the replication regions, delivery regions and domains from
orbitpush.json. - Turns
redirects,headers, domain aliases and the trailing-slash setting into edge rules. - Deletes files that left the build. Scripts, styles and the other files an open page may still load stay a while longer, see Version skew.
- Purges the pull zone cache.
bunny.net takes a few seconds to apply edge rule changes, see bunny.net limits.
Symlinks
A symlinked file is uploaded with the content it points to. A symlinked directory or a broken symlink is skipped with a warning.
Edge rules
Redirects, headers, alias redirects, noindex on <name>.b-cdn.net, the trailing-slash redirect and disable are all bunny.net edge rules on the pull zone.
Rules created by orbitpush have a description that starts with orbitpush <hash>. On deploy:
- new or changed rules are added
- rules that are no longer in
orbitpush.jsonare deleted - every other orbitpush rule is rewritten from
orbitpush.json, so edits made to it in the dashboard are undone
Edge rules you create yourself in the dashboard are never touched. To take over an orbitpush rule, remove the orbitpush prefix from its description. The next deploy then adds a fresh copy, unless you also remove the entry from orbitpush.json.
Every rule counts toward the 50-rule limit of the pull zone.
Hostnames
A hostname on the pull zone that orbitpush.json does not list, such as a removed alias or a former domain, keeps serving the site without a redirect, and deploy warns about it. Remove it with orbitpush domains remove, or with orbitpush deploy --prune-hostnames.