Update Makefile with new variables and start command
This commit is contained in:
parent
0014e877d1
commit
305745273f
1 changed files with 22 additions and 8 deletions
30
Makefile
30
Makefile
|
|
@ -1,6 +1,11 @@
|
|||
.PHONY: all init format lint build build_frontend install_frontend run_frontend run_backend dev help tests coverage
|
||||
|
||||
all: help
|
||||
log_level ?= debug
|
||||
host ?= 0.0.0.0
|
||||
port ?= 7860
|
||||
env ?= .env
|
||||
open_browser ?= true
|
||||
|
||||
setup_poetry:
|
||||
pipx install poetry
|
||||
|
|
@ -69,17 +74,16 @@ endif
|
|||
run_cli:
|
||||
@echo 'Running the CLI'
|
||||
@make install_frontend > /dev/null
|
||||
@echo 'Building the frontend'
|
||||
@make build_frontend > /dev/null
|
||||
@echo 'Install backend dependencies'
|
||||
@make install_backend > /dev/null
|
||||
@echo 'Building the frontend'
|
||||
@make build_frontend > /dev/null
|
||||
ifdef env
|
||||
poetry run langflow run --path src/frontend/build --host $(host) --port $(port) --env-file $(env)
|
||||
@make start env=$(env) host=$(host) port=$(port) log_level=$(log_level)
|
||||
else
|
||||
poetry run langflow run --path src/frontend/build --host $(host) --port $(port) --env-file .env
|
||||
@make start host=$(host) port=$(port) log_level=$(log_level)
|
||||
endif
|
||||
|
||||
|
||||
run_cli_debug:
|
||||
@echo 'Running the CLI in debug mode'
|
||||
@make install_frontend > /dev/null
|
||||
|
|
@ -88,11 +92,21 @@ run_cli_debug:
|
|||
@echo 'Install backend dependencies'
|
||||
@make install_backend > /dev/null
|
||||
ifdef env
|
||||
poetry run langflow run --path src/frontend/build --log-level debug --host $(host) --port $(port) --env-file $(env)
|
||||
@make start env=$(env) host=$(host) port=$(port) log_level=debug
|
||||
else
|
||||
poetry run langflow run --path src/frontend/build --log-level debug --host $(host) --port $(port) --env-file .env
|
||||
@make start host=$(host) port=$(port) log_level=debug
|
||||
endif
|
||||
|
||||
start:
|
||||
@echo 'Running the CLI'
|
||||
ifeq ($(open_browser),false)
|
||||
poetry run langflow run --path src/frontend/build --log-level $(log_level) --host $(host) --port $(port) --env-file $(env) --no-open-browser
|
||||
else
|
||||
poetry run langflow run --path src/frontend/build --log-level $(log_level) --host $(host) --port $(port) --env-file $(env)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
setup_devcontainer:
|
||||
make init
|
||||
make build_frontend
|
||||
|
|
@ -123,7 +137,7 @@ ifeq ($(login),1)
|
|||
poetry run uvicorn --factory langflow.main:create_app --host 0.0.0.0 --port 7860 --reload --env-file .env --loop asyncio
|
||||
else
|
||||
@echo "Running backend with autologin";
|
||||
LANGFLOW_AUTO_LOGIN=True poetry run uvicorn --factory langflow.main:create_app --host 0.0.0.0 --port 7860 --reload --env-file .env --loop asyncio
|
||||
LANGFLOW_AUTO_LOGIN=True poetry run uvicorn --factory langflow.main:create_app --host 0.0.0.0 --port 7860 --reload --env-file .env
|
||||
endif
|
||||
|
||||
build_and_run:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue