2021-09-26 15:25:58 +02:00
|
|
|
<!-- DO NOT EDIT THIS FILE! -->
|
|
|
|
<!-- Instead edit recipe/deploy/rollback.php -->
|
|
|
|
<!-- Then run bin/docgen -->
|
|
|
|
|
2022-07-26 09:18:44 +02:00
|
|
|
# Rollback Recipe
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
[Source](/recipe/deploy/rollback.php)
|
|
|
|
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
### rollback_candidate
|
2021-11-05 23:17:29 +01:00
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/rollback.php#L19)
|
2021-09-26 15:25:58 +02:00
|
|
|
|
2021-11-05 23:17:29 +01:00
|
|
|
Rollback candidate automatically will be automatically chosen by
|
|
|
|
looking at output of `ls` command and content of `.dep/releases_log`.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
2021-11-05 23:17:29 +01:00
|
|
|
If rollback candidate marked as **BAD_RELEASE**, it will be skipped.
|
|
|
|
|
|
|
|
:::tip
|
|
|
|
You can override rollback candidate via:
|
2021-11-10 23:20:32 +01:00
|
|
|
```
|
2021-11-05 23:17:29 +01:00
|
|
|
dep rollback -o rollback_candidate=123
|
|
|
|
```
|
|
|
|
:::
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Tasks
|
|
|
|
|
|
|
|
### rollback
|
2021-11-05 23:17:29 +01:00
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/rollback.php#L62)
|
2021-09-26 15:25:58 +02:00
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
Rollbacks to the previous release.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
2021-11-05 23:17:29 +01:00
|
|
|
Uses [rollback_candidate](/docs/recipe/deploy/rollback.md#rollback_candidate) for symlinking. Current release will be marked as
|
|
|
|
bad by creating file **BAD_RELEASE** with timestamp and [user](/docs/recipe/common.md#user).
|
2021-09-26 15:25:58 +02:00
|
|
|
|
2021-11-05 23:17:29 +01:00
|
|
|
:::warning
|
|
|
|
You can always manually symlink [current_path](/docs/recipe/common.md#current_path) to proper release.
|
2021-11-10 23:20:32 +01:00
|
|
|
```
|
2021-11-05 23:17:29 +01:00
|
|
|
dep run '{{bin/symlink}} releases/123 {{current_path}}'
|
|
|
|
```
|
|
|
|
:::
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|