feat: added debug option in make dev
This commit is contained in:
parent
5beaf7bd13
commit
743e935bec
2 changed files with 34 additions and 5 deletions
11
Makefile
11
Makefile
|
|
@ -40,16 +40,17 @@ build:
|
|||
rm -rf src/backend/langflow/frontend
|
||||
|
||||
dev:
|
||||
make install_frontend
|
||||
make install_frontend
|
||||
ifeq ($(build),1)
|
||||
@echo 'Running docker compose up with build'
|
||||
docker compose up --build
|
||||
@echo 'Running docker compose up with build'
|
||||
docker compose up $(if $(debug),-f docker-compose.debug.yml) --build
|
||||
else
|
||||
@echo 'Running docker compose up without build'
|
||||
docker compose up
|
||||
@echo 'Running docker compose up without build'
|
||||
docker compose up $(if $(debug),-f docker-compose.debug.yml)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
publish:
|
||||
make build
|
||||
poetry publish
|
||||
|
|
|
|||
28
docker-compose.debug.yml
Normal file
28
docker-compose.debug.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
version: '3.4'
|
||||
|
||||
services:
|
||||
backend:
|
||||
volumes:
|
||||
- ./:/app
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./dev.Dockerfile
|
||||
command: ["sh", "-c", "pip install debugpy -t /tmp && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 -m uvicorn langflow.main:app --host 0.0.0.0 --port 7860 --reload"]
|
||||
ports:
|
||||
- 7860:7860
|
||||
- 5678:5678
|
||||
restart: on-failure
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./src/frontend
|
||||
dockerfile: ./dev.Dockerfile
|
||||
args:
|
||||
- BACKEND_URL=http://backend:7860
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./src/frontend/public:/home/node/app/public
|
||||
- ./src/frontend/src:/home/node/app/src
|
||||
- ./src/frontend/package.json:/home/node/app/package.json
|
||||
restart: on-failure
|
||||
Loading…
Add table
Add a link
Reference in a new issue