One command native setup

This commit is contained in:
RNL
2026-03-06 22:16:41 +11:00
parent d6d1cfe9f0
commit 283e0ec6c8
6 changed files with 389 additions and 96 deletions

View File

@@ -5,7 +5,15 @@ import sys
# Ensure the project root (/app) is on sys.path so that both 'standalone'
# and 'bambu_run' are importable regardless of where this script is invoked from.
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, PROJECT_ROOT)
# Load .env so manage.py commands pick up env vars outside of systemd/Docker
try:
from dotenv import load_dotenv
load_dotenv(os.path.join(PROJECT_ROOT, ".env"))
except ImportError:
pass
def main():