mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-12-23 10:38:58 +00:00
e6088af885
* ci: skip frappe builds * refactor: build only one frappe/erpnext image * fix: lint nginx entrypoint script * docs: update and organize docs * docs: fix lint errors * fix(custom): pass base64 encoded apps json * ci: update dependabot * docs: update contributing * docs: remove info about multi image setup * fix: initiate empty common_site_config.json default config has host keys set to localhost causes connection errors * docs: add details for pwd volumes * fix: symlink assets instead of copy * fix: nginx private files * ci: skip docker compose v2 install for ubuntu-latest * fix: organize layers * feat: allow remove git remote for custom image * docs: allow remove git remote for custom image * fix: remove duplicate --apps_path
80 lines
1.9 KiB
HCL
80 lines
1.9 KiB
HCL
# Docker Buildx Bake build definition file
|
|
# Reference: https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md
|
|
|
|
variable "REGISTRY_USER" {
|
|
default = "frappe"
|
|
}
|
|
|
|
variable "FRAPPE_VERSION" {
|
|
default = "develop"
|
|
}
|
|
|
|
variable "ERPNEXT_VERSION" {
|
|
default = "develop"
|
|
}
|
|
|
|
variable "FRAPPE_REPO" {
|
|
default = "https://github.com/frappe/frappe"
|
|
}
|
|
|
|
variable "ERPNEXT_REPO" {
|
|
default = "https://github.com/frappe/erpnext"
|
|
}
|
|
|
|
variable "BENCH_REPO" {
|
|
default = "https://github.com/frappe/bench"
|
|
}
|
|
|
|
# Bench image
|
|
|
|
target "bench" {
|
|
args = {
|
|
GIT_REPO = "${BENCH_REPO}"
|
|
}
|
|
context = "images/bench"
|
|
target = "bench"
|
|
tags = ["frappe/bench:latest"]
|
|
}
|
|
|
|
target "bench-test" {
|
|
inherits = ["bench"]
|
|
target = "bench-test"
|
|
}
|
|
|
|
# Main images
|
|
# Base for all other targets
|
|
|
|
group "default" {
|
|
targets = ["erpnext"]
|
|
}
|
|
|
|
function "tag" {
|
|
params = [repo, version]
|
|
result = [
|
|
# If `version` param is develop (development build) then use tag `latest`
|
|
"${version}" == "develop" ? "${REGISTRY_USER}/${repo}:latest" : "${REGISTRY_USER}/${repo}:${version}",
|
|
# Make short tag for major version if possible. For example, from v13.16.0 make v13.
|
|
can(regex("(v[0-9]+)[.]", "${version}")) ? "${REGISTRY_USER}/${repo}:${regex("(v[0-9]+)[.]", "${version}")[0]}" : "",
|
|
]
|
|
}
|
|
|
|
target "default-args" {
|
|
args = {
|
|
FRAPPE_PATH = "${FRAPPE_REPO}"
|
|
ERPNEXT_PATH = "${ERPNEXT_REPO}"
|
|
BENCH_REPO = "${BENCH_REPO}"
|
|
FRAPPE_BRANCH = "${FRAPPE_VERSION}"
|
|
ERPNEXT_BRANCH = "${ERPNEXT_VERSION}"
|
|
PYTHON_VERSION = can(regex("v13", "${ERPNEXT_VERSION}")) ? "3.9.9" : "3.10.5"
|
|
NODE_VERSION = can(regex("v13", "${FRAPPE_VERSION}")) ? "14.19.3" : "16.18.0"
|
|
}
|
|
}
|
|
|
|
target "erpnext" {
|
|
inherits = ["default-args"]
|
|
context = "."
|
|
dockerfile = "images/production/Containerfile"
|
|
target = "erpnext"
|
|
tags = tag("erpnext", "${ERPNEXT_VERSION}")
|
|
}
|