Files
vigilcare-records/docker-bake.hcl
T
Trent 5a175e3fba
CI / changes (push) Successful in 1m4s
CI / backend (push) Failing after 0s
CI / frontend (push) Failing after 0s
Align CI/CD with shared infra/ci-workflows and drop compose-based CI.
Replace hand-rolled jobs with @v1 callers, capped bake/migrate CD, and remove the docker-compose.ci.yml bridge workaround.
2026-10-06 19:10:58 +08:00

43 lines
1.6 KiB
HCL

# Invoked from the repo root. cwd:// keeps contexts relative to that
# working directory, not this file.
#
# CD must cap the builder cgroup (scripts/cap-buildx-builder.sh)
# and bake one target at a time. The runner host also runs Gitea.
#
# API Dockerfile ends with `final` and exposes scratch `migrate-bundle`.
# Context for API is repo root (Dockerfile COPY paths assume that).
variable "REGISTRY" {}
variable "TAG" {}
group "default" {
targets = ["api", "ui", "migrate"]
}
target "api" {
context = "cwd://"
dockerfile = "VigilCareRecordsAPI/Dockerfile"
target = "final"
tags = ["${REGISTRY}/vigilcare-records-api:${TAG}", "${REGISTRY}/vigilcare-records-api:latest"]
cache-from = ["type=registry,ref=${REGISTRY}/vigilcare-records-api:buildcache"]
cache-to = ["type=registry,ref=${REGISTRY}/vigilcare-records-api:buildcache,mode=max"]
}
target "ui" {
context = "cwd://vigilcare-records-web"
dockerfile = "Dockerfile"
target = "final"
tags = ["${REGISTRY}/vigilcare-records-dashboard:${TAG}", "${REGISTRY}/vigilcare-records-dashboard:latest"]
cache-from = ["type=registry,ref=${REGISTRY}/vigilcare-records-dashboard:buildcache"]
cache-to = ["type=registry,ref=${REGISTRY}/vigilcare-records-dashboard:buildcache,mode=max"]
}
target "migrate" {
context = "cwd://"
dockerfile = "VigilCareRecordsAPI/Dockerfile"
target = "migrate-bundle"
tags = ["vigilcare-records-migrate-bundle:local"]
cache-from = ["type=registry,ref=${REGISTRY}/vigilcare-records-api:buildcache"]
# no cache-to — api already exports this Dockerfile at mode=max
}