-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-bake.hcl
More file actions
61 lines (53 loc) · 1.33 KB
/
Copy pathdocker-bake.hcl
File metadata and controls
61 lines (53 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# docker-bake.hcl
# Define variables for customization
variable "REGISTRY" {
default = "ghcr.io/nmdra"
}
variable "TAG" {
default = "latest"
}
variable "VERSION" {
default = "latest"
}
variable "VITE_API_BASE_URL" {}
variable "VITE_COUNTRY_API_URL" {}
# Define common build configuration
target "common" {
args = {
BUILDKIT_INLINE_CACHE = "1"
}
labels = {
"org.opencontainers.image.vendor" = "Country-Explorer"
"org.opencontainers.image.created" = "${timestamp()}"
"org.opencontainers.image.source" = "https://github.com/nmdra/Country-Explorer"
"org.opencontainers.image.authors" = "Nimendra"
"org.opencontainers.image.licenses" = "MIT"
}
}
# Default group builds all services
group "default" {
targets = ["frontend", "backend"]
}
# Frontend service
target "frontend" {
inherits = ["common"]
context = "./Frontend"
tags = [
"${REGISTRY}/country-explorer-frontend:${TAG}",
"${REGISTRY}/country-explorer-frontend:${VERSION}"
]
args = {
VITE_API_BASE_URL = "${VITE_API_BASE_URL}"
VITE_COUNTRY_API_URL = "${VITE_COUNTRY_API_URL}"
}
}
# Backend service
target "backend" {
inherits = ["common"]
context = "./Backend"
target = "production"
tags = [
"${REGISTRY}/country-explorer-backend:${TAG}",
"${REGISTRY}/country-explorer-backend:${VERSION}"
]
}