update
Some checks failed
Backend EC - Modal Deployment / build-and-push (push) Failing after 3m47s
Backend EC - Modal Deployment / notify-deploy (push) Has been skipped

This commit is contained in:
DatTT127
2026-07-18 22:33:12 +07:00
parent 8a4984a5ce
commit 9b43474991

View File

@@ -25,10 +25,11 @@ import modal
# Get the directory where this script actually lives on the machine running it
SCRIPT_DIR = Path(__file__).resolve().parent
# Automatically resolve the root of the repository (climbing up 3 levels)
# From: deps/implementation/backend_deploy/gitea_modal_build.py
# To: CODEBASE/
PROJECT_ROOT = SCRIPT_DIR.parents[2]
# Walk up until we find a marker directory that identifies the repo root.
# This makes the script robust regardless of where Modal mounts it.
PROJECT_ROOT = SCRIPT_DIR
while not (PROJECT_ROOT / "backend").exists() and PROJECT_ROOT != PROJECT_ROOT.parent:
PROJECT_ROOT = PROJECT_ROOT.parent
# Explicitly find your local Dockerfile
DOCKERFILE_PATH = SCRIPT_DIR / "Dockerfile"