> For the complete documentation index, see [llms.txt](https://camelgemonion.gitbook.io/docker/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://camelgemonion.gitbook.io/docker/dockercompose.yaml-wen-jian-zhong-chang-yong-zhi-ling/untitled-12/untitled-2/untitled-8.md).

# rollback\_config

该选项用于在服务遭遇更新失败时，配置服务的回滚策略。

* parallelism：同时进行回滚的容器数量。如果设置为0，所有容器都会同时进行回滚。
* delay：每一个容器组的回滚的等待时间(默认是0s)。
* failure\_action：设置回滚失败以后的操作。有两种形式：continue和pause(默认是pause)
* monitor：每次任务更新后，监控故障的持续时间(ns|us|ms|s|m|h)(默认是5s)。Note：设置为0将使用默认值5s。
* max\_failure\_ratio: 执行回滚操作期间允许的失败频率容忍度(默认为0)。
* order: 回滚时执行操作的顺序。stop-first(在启动新的容器前，先停止老的容器)。start-first(先启动新的任务，并重复执行该操作)。
