fix(deploy): restore previous release on failure
This commit is contained in:
@@ -270,6 +270,15 @@ docker compose start backend
|
||||
|
||||
This is the usual fix for a bad deploy, and it **does not touch the database**.
|
||||
|
||||
Normal deployments tag backend and frontend images with `APP_COMMIT_SHA` and retain the images from
|
||||
the currently running containers as `jobtracker-backend:previous` and `jobtracker-frontend:previous`.
|
||||
If any step fails after core replacement—including public liveness, readiness, or auth-configuration
|
||||
checks—`deploy.sh` automatically recreates both core services from those retained images and still
|
||||
returns a failed status so CI reports the rejected release. The previous images are replaced only at
|
||||
the start of the next deployment.
|
||||
|
||||
Use the manual procedure below if automatic restoration itself fails or an older release is required.
|
||||
|
||||
```bash
|
||||
cd /opt/job-tracker/app # the deployment checkout
|
||||
git log --oneline -5 # find the last good commit
|
||||
|
||||
Reference in New Issue
Block a user