docs: include Failed container/hook logs section in rolling deployment and pre-deploy hook pages

This commit is contained in:
Pasha Sviderski
2026-04-24 13:20:41 +10:00
parent fe829efbf5
commit 90af550693
2 changed files with 41 additions and 16 deletions
@@ -154,13 +154,27 @@ deployment. Use this only for emergency deployments when you are confident the n
## Rollback on failure
If a new container fails health monitoring during a deployment, Uncloud stops it but keeps it around so you can inspect
its state and logs. For `stop-first` order, Uncloud also restarts the old container. The deployment then stops and the
remaining containers are left untouched.
If a new container fails health monitoring during a deployment, Uncloud stops it but keeps it around for inspection. For
`stop-first` order, Uncloud also restarts the old container. The deployment then stops and the remaining containers are
left untouched.
For example, if the first container in a rolling update succeeds but the second one fails, the first replacement stays
in place.
### Failed container logs
To help you diagnose the failure, `uc deploy` prints the last 10 log lines from the failed container.
You can change how many lines are printed with the `UNCLOUD_FAILED_CONTAINER_LOGS_TAIL` environment variable. Set it to
a number or to `all` to print the full container log:
```shell
export UNCLOUD_FAILED_CONTAINER_LOGS_TAIL=50
```
You can fetch the full logs with [`uc logs`](../../9-cli-reference/uc_logs.md) or inspect the status of the stopped
container with [`uc inspect`](../../9-cli-reference/uc_inspect.md) or [`uc ps`](../../9-cli-reference/uc_ps.md).
## Retry after failure
You can retry the deployment by running `uc deploy` again. Uncloud will skip the successfully deployed containers if the