Skip to content

Commit

Permalink
Merge pull request #43 from logspace-ai/dev
Browse files Browse the repository at this point in the history
Release 0.0.40
  • Loading branch information
ibiscp authored Mar 18, 2023
2 parents 472b0d6 + 3b227f0 commit 29cfdd3
Show file tree
Hide file tree
Showing 99 changed files with 301 additions and 870 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ make run_backend
```
For the frontend, you will need to install the dependencies and start the development server.
```bash
cd langflow/frontend
cd src/frontend
npm install
npm start
```
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ COPY pyproject.toml ./
COPY ./langflow ./langflow

# Copy files from frontend
COPY --from=frontend_build /app/build /app/langflow/frontend/build/
COPY --from=frontend_build /app/build /app/src/frontend/build/

RUN pip install .

Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ lint:
poetry run ruff . --fix

install_frontend:
cd langflow/frontend && npm install
cd src/frontend && npm install

run_frontend:
cd langflow/frontend && npm start
cd src/frontend && npm start

run_backend:
poetry run uvicorn langflow_backend.main:app --port 5003 --reload
poetry run uvicorn langflow.main:app --port 5003 --reload

build_frontend:
cd langflow/frontend && CI='' npm run build
cd src/frontend && CI='' npm run build
cp -r src/frontend/build src/backend/langflow/frontend

build:
make install_frontend
make build_frontend
cp -r langflow/frontend/build langflow/backend/langflow_backend/frontend
poetry build --format sdist
rm -rf langflow/backend/langflow_backend/frontend
rm -rf src/backend/langflow/frontend

publish:
make build
Expand Down
2 changes: 1 addition & 1 deletion build_and_push
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash

cd langflow/frontend
cd src/frontend
docker build -t logspace/frontend_build -f build.Dockerfile .
cd ../backend
docker build -t logspace/backend_build -f build.Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ COPY ./ ./
# Install dependencies
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi

CMD ["uvicorn", "langflow_backend.main:app", "--host", "0.0.0.0", "--port", "5003", "--reload"]
CMD ["uvicorn", "langflow.main:app", "--host", "0.0.0.0", "--port", "5003", "--reload"]
13 changes: 7 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@ services:
context: ./
dockerfile: ./dev.Dockerfile
ports:
- "5003:5003"
- "7860:7860"
volumes:
- ./:/app
platform: linux/amd64
command: bash -c "uvicorn langflow_backend.main:app --host 0.0.0.0 --port 5003 --reload"
command: bash -c "uvicorn langflow.main:app --host 0.0.0.0 --port 7860 --reload"

frontend:
build:
context: ./langflow/frontend
context: ./src/frontend
dockerfile: ./dev.Dockerfile
ports:
- "3000:3000"
volumes:
- ./langflow/frontend:/app
- ./src/frontend:/app
# Set process.env.BACKEND to the backend service
environment:
- BACKEND="http://backend:5003"
- BACKEND_HOST="http://backend"
- BACKEND_PORT="7860"
restart: on-failure
5 changes: 2 additions & 3 deletions docker_example/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM python:3.11-slim

WORKDIR /app
COPY ./ /app
RUN apt-get update && apt-get install gcc -y
RUN pip install langflow>=0.0.33

EXPOSE 5003
EXPOSE 7860
CMD ["langflow", "--host", "0.0.0.0"]
3 changes: 1 addition & 2 deletions docker_example/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ version: '3'
services:
langflow:
build:
context: ./
context: .
dockerfile: Dockerfile
ports:
- "5003:5003"
command: langflow --host 0.0.0.0
platform: linux/amd64
1 change: 0 additions & 1 deletion langflow/backend/langflow_backend/__init__.py

This file was deleted.

55 changes: 0 additions & 55 deletions langflow/backend/langflow_backend/__main__.py

This file was deleted.

Loading

0 comments on commit 29cfdd3

Please sign in to comment.