Files
Trent e2e70fcb3b
CI / changes (push) Successful in 28s
CI / frontend (push) Failing after 0s
CI / backend (push) Failing after 5m16s
Align CI/CD with the platform kit: reusable node-ci, job-network sidecars, and capped bake/migrate CD.
2026-09-30 18:18:56 +08:00

59 lines
1.9 KiB
HCL

# Bake from repo root. CD caps the builder (scripts/cap-buildx-builder.sh)
# and bakes one target at a time so Gitea on the shared host stays up.
#
# API / gateway contexts are the repo root (sibling ProjectReferences).
# Dashboard context is vigilcare-dashboard/.
variable "REGISTRY" {}
variable "TAG" {}
variable "VITE_API_URL" {
default = ""
}
variable "VITE_SHOW_OPS" {
default = "false"
}
group "default" {
targets = ["api", "gateway", "dashboard", "migrate"]
}
target "api" {
context = "cwd://"
dockerfile = "VigilCareClinicalAPI/Dockerfile"
target = "final"
tags = ["${REGISTRY}/clinical-api:${TAG}", "${REGISTRY}/clinical-api:latest"]
cache-from = ["type=registry,ref=${REGISTRY}/clinical-api:buildcache"]
cache-to = ["type=registry,ref=${REGISTRY}/clinical-api:buildcache,mode=max"]
}
target "gateway" {
context = "cwd://"
dockerfile = "VigilCare.WardGateway/Dockerfile"
target = "final"
tags = ["${REGISTRY}/ward-gateway:${TAG}", "${REGISTRY}/ward-gateway:latest"]
cache-from = ["type=registry,ref=${REGISTRY}/ward-gateway:buildcache"]
cache-to = ["type=registry,ref=${REGISTRY}/ward-gateway:buildcache,mode=max"]
}
target "dashboard" {
context = "cwd://vigilcare-dashboard"
dockerfile = "Dockerfile"
target = "final"
args = {
VITE_API_URL = VITE_API_URL
VITE_SHOW_OPS = VITE_SHOW_OPS
}
tags = ["${REGISTRY}/dashboard:${TAG}", "${REGISTRY}/dashboard:latest"]
cache-from = ["type=registry,ref=${REGISTRY}/dashboard:buildcache"]
cache-to = ["type=registry,ref=${REGISTRY}/dashboard:buildcache,mode=max"]
}
target "migrate" {
context = "cwd://"
dockerfile = "VigilCareClinicalAPI/Dockerfile"
target = "migrate-bundle"
tags = ["vigilcare-migrate-bundle:local"]
cache-from = ["type=registry,ref=${REGISTRY}/clinical-api:buildcache"]
# no cache-to — api already exports this Dockerfile at mode=max
}