Fix health endpoint, align with the documented manual runbook
The health router is mounted at prefix="/api" in domaindingo's main.py, so /health 404s. Checking it would have failed every deploy and rolled back a perfectly good image. Also adopts three conventions from the vault's DomainDingo Development note: recreate a single named service (--no-deps --force-recreate), validate with compose config --quiet before touching the running container, and write the rollback record in the documented format and location.
This commit is contained in:
+10
-21
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"version": 1,
|
||||
|
||||
"_comment": [
|
||||
"Single source of truth for the fleet's continuous-deployment targets.",
|
||||
"A target is uniquely identified by (repo, branch). The 'host' field decides",
|
||||
@@ -10,20 +9,16 @@
|
||||
"Adding an environment is an edit here plus a re-run of install/install.sh on",
|
||||
"the owning host. It is never a change to the project repository."
|
||||
],
|
||||
|
||||
"defaults": {
|
||||
"ntfy_base_url": "https://ntfy.fisher.hu",
|
||||
|
||||
"image_wait_seconds": 900,
|
||||
"image_poll_interval": 15,
|
||||
|
||||
"health_retries": 30,
|
||||
"health_interval": 5,
|
||||
|
||||
"lock_wait_seconds": 600,
|
||||
"compose_timeout_seconds": 300
|
||||
"compose_timeout_seconds": 300,
|
||||
"rollback_record_dir": "."
|
||||
},
|
||||
|
||||
"hosts": {
|
||||
"s5.fisher.hu": {
|
||||
"bind": "10.255.255.1",
|
||||
@@ -34,7 +29,6 @@
|
||||
"port": 21600
|
||||
}
|
||||
},
|
||||
|
||||
"targets": [
|
||||
{
|
||||
"name": "domaindingo-test",
|
||||
@@ -43,24 +37,21 @@
|
||||
"branch": "test",
|
||||
"env": "test",
|
||||
"host": "s5.fisher.hu",
|
||||
|
||||
"stack_dir": "/home/fisher/S/uas-ng/docker/domaindingo/s5.fisher.hu",
|
||||
"compose_file": "docker-compose.yml",
|
||||
"compose_project": "domaindingo-test",
|
||||
"container": "domaindingo-test",
|
||||
|
||||
"compose_service": "domaindingo-test",
|
||||
"image_repo": "gitea.fisher.hu/webdev/domaindingo",
|
||||
"image_tag_template": "{branch}-sha-{short7}",
|
||||
"image_env_var": "DOMAINDINGO_TEST_IMAGE",
|
||||
"pull_policy_env_var": "DOMAINDINGO_TEST_PULL_POLICY",
|
||||
|
||||
"health_url": "http://127.0.0.1:9101/health",
|
||||
"health_url": "http://127.0.0.1:9101/api/health",
|
||||
"health_expect_key": "db",
|
||||
"health_expect_value": "ok",
|
||||
|
||||
"rollback_on_failure": true
|
||||
"rollback_on_failure": true,
|
||||
"rollback_record_dir": "backup-test"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "domaindingo-prod",
|
||||
"enabled": true,
|
||||
@@ -68,22 +59,20 @@
|
||||
"branch": "prod",
|
||||
"env": "prod",
|
||||
"host": "s5.fisher.hu",
|
||||
|
||||
"stack_dir": "/home/fisher/S/uas-ng/docker/domaindingo/s5.fisher.hu",
|
||||
"compose_file": "docker-compose-prod.yml",
|
||||
"compose_project": "domaindingo-prod",
|
||||
"container": "domaindingo-prod",
|
||||
|
||||
"compose_service": "domaindingo-prod",
|
||||
"image_repo": "gitea.fisher.hu/webdev/domaindingo",
|
||||
"image_tag_template": "{branch}-sha-{short7}",
|
||||
"image_env_var": "DOMAINDINGO_PROD_IMAGE",
|
||||
"pull_policy_env_var": "DOMAINDINGO_PROD_PULL_POLICY",
|
||||
|
||||
"health_url": "http://127.0.0.1:9103/health",
|
||||
"health_url": "http://127.0.0.1:9103/api/health",
|
||||
"health_expect_key": "db",
|
||||
"health_expect_value": "ok",
|
||||
|
||||
"rollback_on_failure": true
|
||||
"rollback_on_failure": true,
|
||||
"rollback_record_dir": "backup-prod"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user