mirror of
https://github.com/fleetbase/fleetbase.git
synced 2025-12-19 14:18:57 +00:00
47 lines
909 B
HCL
47 lines
909 B
HCL
// docker-bake.hcl
|
|
variable "COMPOSER_AUTH" { default = "" }
|
|
variable "REGISTRY" { default = "" }
|
|
variable "VERSION" { default = "latest" }
|
|
|
|
group "default" {
|
|
targets = ["app", "app-httpd"]
|
|
}
|
|
|
|
target "app" {
|
|
name = "app-${tgt}"
|
|
|
|
// use matrix strategy to build several targets at once
|
|
matrix = {
|
|
tgt = ["app", "scheduler", "events"]
|
|
}
|
|
context = "./"
|
|
// set the target from matrix
|
|
target = tgt
|
|
dockerfile = "docker/Dockerfile"
|
|
platforms = [
|
|
"linux/amd64",
|
|
]
|
|
|
|
tags = notequal("", REGISTRY) ? formatlist(
|
|
"${REGISTRY}:${tgt}-%s",
|
|
compact(["latest", VERSION])
|
|
) : []
|
|
|
|
args = {
|
|
"COMPOSER_AUTH" = COMPOSER_AUTH
|
|
}
|
|
}
|
|
|
|
target "app-httpd" {
|
|
context = "./"
|
|
dockerfile = "docker/httpd/Dockerfile"
|
|
platforms = [
|
|
"linux/amd64",
|
|
]
|
|
|
|
tags = notequal("", REGISTRY) ? formatlist(
|
|
"${REGISTRY}:app-httpd-%s",
|
|
compact(["latest", VERSION])
|
|
) : []
|
|
}
|