From c9410992757e63fa66d9a2b6c68fc3ebae532262 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sun, 8 Oct 2023 17:50:14 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(Makefile):=20fix=20typo=20in?= =?UTF-8?q?=20make=20target=20name=20'install=5Ffrontendc'=20to=20'install?= =?UTF-8?q?=5Ffrontend'=20to=20resolve=20error=20during=20frontend=20insta?= =?UTF-8?q?llation=20=E2=9C=A8=20feat(Makefile):=20add=20error=20handling?= =?UTF-8?q?=20to=20retry=20frontend=20installation=20if=20it=20fails=20to?= =?UTF-8?q?=20ensure=20successful=20installation=20=F0=9F=90=9B=20fix(Make?= =?UTF-8?q?file):=20fix=20typo=20in=20make=20target=20name=20'install=5Ffr?= =?UTF-8?q?ontendc'=20to=20'install=5Ffrontend'=20to=20resolve=20error=20d?= =?UTF-8?q?uring=20frontend=20installation=20=E2=9C=A8=20feat(Makefile):?= =?UTF-8?q?=20add=20support=20for=20running=20backend=20with=20or=20withou?= =?UTF-8?q?t=20autologin=20based=20on=20the=20value=20of=20the=20'autologi?= =?UTF-8?q?n'=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1fbd7403c..168ac06d2 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,11 @@ setup_devcontainer: poetry run langflow --path src/frontend/build frontend: - make install_frontend + @-make install_frontend + @if [ $$? -ne 0 ]; then \ + echo "An error occurred while installing frontend dependencies. Attempting to fix."; \ + make install_frontendc; \ + fi make run_frontend frontendc: @@ -65,7 +69,13 @@ install_backend: backend: make install_backend - poetry run uvicorn --factory src.backend.langflow.main:create_app --port 7860 --reload --log-level debug +ifeq ($(autologin),1) + @echo "Running backend with autologin"; + LANGFLOW_AUTO_LOGIN=True poetry run langflow run --backend-only --port 7860 --host 0.0.0.0 +else + @echo "Running backend without autologin"; + poetry run langflow run --backend-only --port 7860 --host 0.0.0.0 +endif build_and_run: echo 'Removing dist folder'