Deployment Retention
Every time content is deployed to ricochet, the source code and dependencies are packaged together into a bundle. Bundles persist across deployments so ricochet can roll back, redeploy, or inspect past versions.
How cleanup works
Section titled “How cleanup works”ricochet runs a cleanup process once daily at 05:00 UTC. It evaluates every content item against the configured retention policy and deletes bundles that exceed the defined limits.
If no retention settings are configured, bundles accumulate without limit.
Configuration Options
Section titled “Configuration Options”| Setting | Description | Default |
|---|---|---|
max_deployments | Maximum number of bundles to keep per content item | 20 |
max_age_days | Delete bundles older than this many days | No limit |
max_bundle_size | Maximum size of a bundle accepted by the /upload endpoint | "100mb" |
max_deployments and max_age_days can also be overridden per content item.
Set server-wide defaults for all content items in the [retention] section of ricochet-config.toml:
[retention]max_deployments = 20max_age_days = 90max_bundle_size = "100mb"max_deployments and max_age_days govern cleanup of existing bundles.
max_bundle_size limits the size of a bundle that is accepted by the /upload API endpoint.
If a bundle is larger than max_bundle_size it is rejected by the API.
Policy resolution
Section titled “Policy resolution”Retention settings can be configured at two levels:
- Server-wide: in
ricochet-config.toml, under the[retention]section. Applies to all content items. - Per-content: in the content item’s
_ricochet.toml, under the[retention]section. Overrides the server default for that item.
See Deployment Retention in the user guide for per-content configuration.