🐛 fix(dev.Dockerfile): update uvicorn command to use --factory flag and create_app function to improve modularity and maintainability

🐛 fix(docker-compose.debug.yml): update uvicorn command to use --factory flag and create_app function to match changes in dev.Dockerfile

🐛 fix(docker-compose.yml): update uvicorn command to use --factory flag and create_app function to match changes in dev.Dockerfile
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-05 16:26:32 -03:00
commit e300a05d26
3 changed files with 18 additions and 13 deletions

View file

@ -15,4 +15,4 @@ COPY ./ ./
# Install dependencies # Install dependencies
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi
CMD ["uvicorn", "langflow.main:app", "--host", "0.0.0.0", "--port", "5003", "--reload", "log-level", "debug"] CMD ["uvicorn","--factory", "langflow.main:create_app", "--host", "0.0.0.0", "--port", "5003", "--reload", "log-level", "debug"]

View file

@ -1,4 +1,4 @@
version: '3.4' version: "3.4"
services: services:
backend: backend:
@ -7,7 +7,12 @@ services:
build: build:
context: ./ context: ./
dockerfile: ./dev.Dockerfile 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"] command:
[
"sh",
"-c",
"pip install debugpy -t /tmp && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 -m uvicorn --factory langflow.main:create_app --host 0.0.0.0 --port 7860 --reload",
]
ports: ports:
- 7860:7860 - 7860:7860
- 5678:5678 - 5678:5678

View file

@ -1,4 +1,4 @@
version: '3' version: "3"
services: services:
backend: backend:
@ -9,7 +9,7 @@ services:
- "7860:7860" - "7860:7860"
volumes: volumes:
- ./:/app - ./:/app
command: bash -c "uvicorn langflow.main:app --host 0.0.0.0 --port 7860 --reload" command: bash -c "uvicorn --factory langflow.main:create_app --host 0.0.0.0 --port 7860 --reload"
frontend: frontend:
build: build: