Add conditional logic for environment file in Makefile

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-26 17:30:11 -03:00
commit 975340af9e

View file

@ -57,15 +57,22 @@ run_cli:
@make install_frontend > /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)
else
poetry run langflow run --path src/frontend/build --host $(host) --port $(port) --env-file .env
endif
run_cli_debug:
@echo 'Running the CLI in debug mode'
@make install_frontend > /dev/null
@echo 'Building the frontend'
@make build_frontend > /dev/null
poetry run langflow run --path src/frontend/build --log-level debug --host $(host) --port $(port) --env-file .env
ifdef env
poetry run langflow run --path src/frontend/build --log-level debug --host $(host) --port $(port) --env-file $(env)
else
poetry run langflow run --path src/frontend/build --log-level debug --host $(host) --port $(port) --env-file .env
endif
setup_devcontainer:
make init
make build_frontend