Align CI/CD with the platform kit: reusable node-ci, job-network sidecars, and capped bake/migrate CD.
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# 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
|
||||
}
|
||||
Reference in New Issue
Block a user