Update deployment workflows
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m5s
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m5s
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user