update the gitea build
Some checks failed
Backend EC - Modal Deployment / build-and-push (push) Failing after 53s
Backend EC - Modal Deployment / notify-deploy (push) Has been skipped

This commit is contained in:
DatTT127
2026-07-19 00:06:24 +07:00
parent e645b3ee77
commit 311bae081b

View File

@@ -35,17 +35,26 @@ APP_NAME = "msk-lumina-backend-builder"
# ============================================================================= # =============================================================================
# Modal Image Definition # Modal Image Definition
# ============================================================================= # =============================================================================
builder_image = ( # 1. Start from Kaniko to extract the binary, and map it to a local folder via an App build
# 1. Start from Kaniko debug (includes a basic shell, necessary for Modal) kaniko_image = (
modal.Image.from_registry("gcr.io/kaniko-project/executor:debug") modal.Image.from_registry("gcr.io/kaniko-project/executor:debug")
.add_local_dir(os.getcwd(), remote_path="/workspace")
)
# 2. Inject python-pip and dependencies natively on top of the image # 2. Build your final builder image on a clean Debian system that HAS apt-get
builder_image = (
modal.Image.debian_slim()
.apt_install("curl", "ca-certificates") .apt_install("curl", "ca-certificates")
.pip_install("boto3") .pip_install("boto3")
# 3. Mount your local project directory context to /workspace # Use standard dockerfile_commands to copy the binary directly from the Kaniko base image layer
.dockerfile_commands(
[
"COPY --from=gcr.io/kaniko-project/executor:debug /kaniko/executor /usr/local/bin/kaniko"
]
)
.add_local_dir( .add_local_dir(
os.getcwd(), # Or your dynamic project root lookup path os.getcwd(),
remote_path="/workspace", remote_path="/workspace",
) )
) )