fix: retry production health checks during startup

This commit is contained in:
syntaxbullet
2026-07-13 12:33:09 +02:00
parent 0e41c890f9
commit 64049baef0
2 changed files with 32 additions and 4 deletions

View File

@@ -81,7 +81,7 @@ The deploy script:
4. writes the deployed Git revision to `.deploy-revision`
5. builds the Docker image on the VPS
6. recreates only the `bmp_website` app container
7. verifies `/` and `/admin`
7. verifies `/` and `/admin`, retrying transient startup failures for up to 60 seconds
The required workflow is:
@@ -114,6 +114,18 @@ If the Caddy container also needs to be recreated:
DEPLOY_CADDY=1 pnpm deploy:vps
```
The post-deploy verification tolerates brief `502` responses while Next/Payload
starts. Its retry behavior can be adjusted when needed:
```bash
VERIFY_RETRIES=30
VERIFY_RETRY_DELAY_SECONDS=2
VERIFY_RETRY_MAX_SECONDS=60
VERIFY_REQUEST_TIMEOUT_SECONDS=20
```
Set `SKIP_VERIFY=1` only when verification is being performed separately.
## Payload Migrations
Routine deploys do not run migrations. For schema-changing commits, create and