Generic host/repo/branch-aware CD on adnanh/webhook
Replaces the per-project deploy scripts and self-contained webhook receivers with one manifest-driven implementation that lives outside the application repositories and can be updated independently of them. First targets: domaindingo test and prod on s5.
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"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",
|
||||
"which machine acts on it -- every host runs the same daemon from the same",
|
||||
"checkout of this repo and simply ignores targets that are not its own.",
|
||||
"",
|
||||
"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": {
|
||||
"registry": "gitea.fisher.hu",
|
||||
"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
|
||||
},
|
||||
|
||||
"hosts": {
|
||||
"s5.fisher.hu": {
|
||||
"bind": "10.255.255.1",
|
||||
"port": 20090
|
||||
},
|
||||
"s4.fisher.hu": {
|
||||
"bind": "10.255.255.12",
|
||||
"port": 20090
|
||||
}
|
||||
},
|
||||
|
||||
"targets": [
|
||||
{
|
||||
"name": "domaindingo-test",
|
||||
"enabled": true,
|
||||
"repo": "webdev/domaindingo",
|
||||
"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",
|
||||
|
||||
"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_expect_key": "db",
|
||||
"health_expect_value": "ok",
|
||||
|
||||
"rollback_on_failure": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "domaindingo-prod",
|
||||
"enabled": true,
|
||||
"repo": "webdev/domaindingo",
|
||||
"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",
|
||||
|
||||
"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_expect_key": "db",
|
||||
"health_expect_value": "ok",
|
||||
|
||||
"rollback_on_failure": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user