Update deployment workflows
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m5s

This commit is contained in:
2026-09-17 03:13:26 -07:00
parent 69726f7d34
commit f9bb7e6124
3 changed files with 59 additions and 6 deletions

View File

@@ -16,6 +16,10 @@ job "blog" {
group "blog" {
count = 1
# let Consul/Traefik deregister the old allocation before it exits,
# so no requests are routed to it during a rolling switchover
shutdown_delay = "10s"
network {
port "http" {
to = 3000
@@ -52,6 +56,18 @@ job "blog" {
"traefik.http.services.blog-svc.loadbalancer.healthcheck.timeout=2s",
"traefik.http.services.blog-svc.loadbalancer.healthcheck.hostname=${local.HOST}",
]
# canary allocations register with these tags instead, so Traefik
# does not route production traffic to them before promotion
canary_tags = ["canary"]
check {
name = "blog-health"
type = "http"
path = "/healthz"
interval = "10s"
timeout = "2s"
}
}
task "blog" {
@@ -65,8 +81,11 @@ job "blog" {
update {
max_parallel = 1
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "3m"
canary = 1
auto_promote = true
auto_revert = true
}
}