Skip to content
ricochet

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.

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.

SettingDescriptionDefault
max_deploymentsMaximum number of bundles to keep per content item20
max_age_daysDelete bundles older than this many daysNo limit
max_bundle_sizeMaximum 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:

ricochet-config.toml
[retention]
max_deployments = 20
max_age_days = 90
max_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.

Retention settings can be configured at two levels:

  1. Server-wide: in ricochet-config.toml, under the [retention] section. Applies to all content items.
  2. 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.