diff --git a/Dockerfile b/Dockerfile index b542356..8387689 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,6 @@ RUN ln -s /pact_broker/script/db-version.sh /usr/local/bin/db-version ENV RACK_ENV=production ENV PACT_BROKER_DATABASE_CLEAN_ENABLED=false ENV PACT_BROKER_DATABASE_CLEAN_CRON_SCHEDULE="15 2 * * *" -ENV PACT_BROKER_DATABASE_CLEAN_KEEP_VERSION_SELECTORS='[{ "latest": true, "tag": true }, { "max_age": 90 }, { "deployed": true }, { "released" : true }]' ENV PACT_BROKER_DATABASE_CLEAN_DELETION_LIMIT=500 ENV PACT_BROKER_DATABASE_CLEAN_OVERWRITTEN_DATA_MAX_AGE=7 ENV PACT_BROKER_DATABASE_CLEAN_DRY_RUN=false diff --git a/README.md b/README.md index 02b2cb9..6db7b82 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ If you have exactly one Pact Broker container running at a time, you can configu * `PACT_BROKER_DATABASE_CLEAN_CRON_SCHEDULE`: set to a cron schedule that will run when your Broker is under the least operational load. Default is 2:15am - `15 2 * * *` * `PACT_BROKER_DATABASE_CLEAN_DELETION_LIMIT`: The maximum number of records to delete at a time for each of the categories listed in the [Categories of removable data](https://docs.pact.io/pact_broker/administration/maintenance#categories-of-removable-data). Defaults to `500`. * `PACT_BROKER_DATABASE_CLEAN_OVERWRITTEN_DATA_MAX_AGE`: The maximum number of days to keep "overwritten" data as described in the [Categories of removable data](https://docs.pact.io/pact_broker/administration/maintenance#categories-of-removable-data) -* `PACT_BROKER_DATABASE_CLEAN_KEEP_VERSION_SELECTORS`: a JSON string containing a list of the "keep" selectors described in [Configuring the keep selectors](https://docs.pact.io/pact_broker/administration/maintenance#configuring-the-keep-selectors) e.g `[{"latest": true, "tag": true}, {"max_age": 90}]` (remember to escape the quotes if necessary in your configuration files/console). +* `PACT_BROKER_DATABASE_CLEAN_KEEP_VERSION_SELECTORS`: a JSON string containing a list of the "keep" selectors described in [Configuring the keep selectors](https://docs.pact.io/pact_broker/administration/maintenance#configuring-the-keep-selectors) e.g `[{"latest": true, "branch": true}, { "max_age": 90 }, { "deployed" : true }, { "released" : true }]` (remember to escape the quotes if necessary in your configuration files/console). * `PACT_BROKER_DATABASE_CLEAN_DRY_RUN`: defaults to `false`. Set to `true` to see the output of what *would* have been deleted if the task had run. This is helpful when experimenting with or fine tuning the clean feature. As nothing is deleted when in dry-run mode, the same output will be printed in the logs each time the task runs. ### Running the clean task from an external source