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

@@ -58,3 +58,5 @@ jobs:
tags: | tags: |
${{ env.IMAGE_NAME }}:latest ${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ steps.sha.outputs.short_sha }} ${{ env.IMAGE_NAME }}:${{ steps.sha.outputs.short_sha }}
provenance: false
sbom: false

View File

@@ -16,6 +16,10 @@ job "blog" {
group "blog" { group "blog" {
count = 1 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 { network {
port "http" { port "http" {
to = 3000 to = 3000
@@ -52,6 +56,18 @@ job "blog" {
"traefik.http.services.blog-svc.loadbalancer.healthcheck.timeout=2s", "traefik.http.services.blog-svc.loadbalancer.healthcheck.timeout=2s",
"traefik.http.services.blog-svc.loadbalancer.healthcheck.hostname=${local.HOST}", "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" { task "blog" {
@@ -65,8 +81,11 @@ job "blog" {
update { update {
max_parallel = 1 max_parallel = 1
health_check = "checks"
min_healthy_time = "10s" min_healthy_time = "10s"
healthy_deadline = "3m" healthy_deadline = "3m"
canary = 1
auto_promote = true
auto_revert = true auto_revert = true
} }
} }

View File

@@ -65,13 +65,13 @@
"Update": { "Update": {
"Stagger": null, "Stagger": null,
"MaxParallel": 1, "MaxParallel": 1,
"HealthCheck": null, "HealthCheck": "checks",
"MinHealthyTime": 10000000000, "MinHealthyTime": 10000000000,
"HealthyDeadline": 180000000000, "HealthyDeadline": 180000000000,
"ProgressDeadline": null, "ProgressDeadline": null,
"Canary": null, "Canary": 1,
"AutoRevert": true, "AutoRevert": true,
"AutoPromote": null "AutoPromote": true
}, },
"Migrate": null, "Migrate": null,
"Networks": [ "Networks": [
@@ -118,12 +118,44 @@
"traefik.http.services.blog-svc.loadbalancer.healthcheck.timeout=2s", "traefik.http.services.blog-svc.loadbalancer.healthcheck.timeout=2s",
"traefik.http.services.blog-svc.loadbalancer.healthcheck.hostname=cbraaten.dev" "traefik.http.services.blog-svc.loadbalancer.healthcheck.hostname=cbraaten.dev"
], ],
"CanaryTags": null, "CanaryTags": [
"canary"
],
"EnableTagOverride": false, "EnableTagOverride": false,
"PortLabel": "http", "PortLabel": "http",
"AddressMode": "", "AddressMode": "",
"Address": "", "Address": "",
"Checks": null, "Checks": [
{
"Name": "blog-health",
"Type": "http",
"Command": "",
"Args": null,
"Path": "/healthz",
"Protocol": "",
"PortLabel": "",
"Expose": false,
"AddressMode": "",
"Advertise": "",
"Interval": 10000000000,
"Timeout": 2000000000,
"InitialStatus": "",
"Notes": "",
"TLSServerName": "",
"TLSSkipVerify": false,
"Header": null,
"Method": "",
"CheckRestart": null,
"GRPCService": "",
"GRPCUseTLS": false,
"TaskName": "",
"SuccessBeforePassing": 0,
"FailuresBeforeCritical": 0,
"FailuresBeforeWarning": 0,
"Body": "",
"OnUpdate": ""
}
],
"CheckRestart": null, "CheckRestart": null,
"Connect": null, "Connect": null,
"Meta": null, "Meta": null,
@@ -138,7 +170,7 @@
"Kind": "" "Kind": ""
} }
], ],
"ShutdownDelay": null, "ShutdownDelay": 10000000000,
"StopAfterClientDisconnect": null, "StopAfterClientDisconnect": null,
"MaxClientDisconnect": null, "MaxClientDisconnect": null,
"Scaling": null, "Scaling": null,