Introduction
thumper
is a self-contained tool for deploying static assets to BunnyCDN storage zones. It
is straightforward to integrate into CI/CD and deploys static web pages quickly.
Features
- Syncs only files that have changed locally
- Delete files remotely that are missing locally
- Concurrency control to prevent concurrent deploys
- Concurrent file discovery and upload for quick deployments
- Syncs html files last
- Dry runs and verbose output
- Auto-complete
Getting thumper
The recommended method of installing is to use mise:
mise use ubi:kaaveland/thumper@latest
This downloads the latest release for your platform from the releases page, which you can also do manually.
There's a docker image available at ghcr.
It is also possible to install thumper
with cargo install thumper
.
The code is available under the MIT License and the repository is at GitHub.
Usage
thumper
needs to authenticate to BunnyCDN
in order to work. The recommended approach is to make two environment variables available:
THUMPER_KEY
- this is the password to aBunnyCDN
storage zone.THUMPER_API_KEY
- this is the api key toBunnyCDN
. It is only necessary if you wantthumper
to purge your pull zone.
Make sure to keep these values secret, an attacker could do a lot of damage with them.
thumper
Sync your files to bunny cdn storage zone
Usage: thumper <COMMAND>
Commands:
sync Sync a local folder to a path within a bunny.net Storage Zone
completions Provide shell completions
purge-url Purge a URL from the bunny.net cache
purge-zone Purge an entire pull zone from bunny.net cache
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help (see more with '--help')
-V, --version Print version
thumper sync
Sync a local folder to a path within a bunny.net Storage Zone
Usage: thumper sync [OPTIONS] <local_path> <storage_zone>
Arguments:
<local_path> Local directory to put in the storage zone
<storage_zone> Which storage zone to sync to
Options:
-e, --endpoint <ENDPOINT> Which bunny cdn endpoint to use [default: storage.bunnycdn.com]
-a, --access-key <ACCESS_KEY> Password for the storage zone - looked up in environment variable THUMPER_KEY if not present
-p, --path <PATH> Path inside the storage zone to sync to, path to a directory [default: /]
--dry-run Don't sync, just show what would change
-f, --force Force a sync despite a hanging lock file
--lockfile <LOCKFILE> Filename to use for the lockfile. thumper will not sync if this file exists in the destination [default: .thumper.lock]
-i, --ignore <IGNORE> Do not delete anything in the storage zone paths that start with this prefix (can pass multiple times)
-v, --verbose
-c, --concurrency <CONCURRENCY> Number of threads to use when calling bunny.net API (default to number of cpus)
-h, --help Print help