Integrate backend sidecar process and external binaries into the Tauri build

This commit is contained in:
2026-05-06 06:45:57 +02:00
parent dc8df4a8ab
commit caaf7e6c79
6 changed files with 217 additions and 3 deletions

27
backend/sidecar_main.py Normal file
View File

@@ -0,0 +1,27 @@
from __future__ import annotations
import multiprocessing
import os
import uvicorn
def main() -> None:
multiprocessing.freeze_support()
os.environ.setdefault("HEIMGEIST_BACKEND_SIDECAR", "1")
host = os.getenv("HEIMGEIST_BACKEND_HOST", "127.0.0.1")
port = int(os.getenv("HEIMGEIST_BACKEND_PORT", "8000"))
log_level = os.getenv("HEIMGEIST_BACKEND_LOG_LEVEL", "info")
uvicorn.run(
"backend.main:app",
host=host,
port=port,
log_level=log_level,
reload=False,
workers=1,
)
if __name__ == "__main__":
main()