Skip to content

Commit

Permalink
Merge branch 'main' into feat-newFreeze
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielluiz committed Jul 12, 2024
2 parents 7d22b3c + c47c358 commit 0152734
Show file tree
Hide file tree
Showing 119 changed files with 4,702 additions and 1,995 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ LANGFLOW_OPEN_BROWSER=
# Example: LANGFLOW_REMOVE_API_KEYS=false
LANGFLOW_REMOVE_API_KEYS=

# Whether to use RedisCache or InMemoryCache
# Values: memory, redis
# Whether to use RedisCache or ThreadingInMemoryCache or AsyncInMemoryCache
# Values: async, memory, redis
# Example: LANGFLOW_CACHE_TYPE=memory
# If you want to use redis then the following environment variables must be set:
# LANGFLOW_REDIS_HOST (default: localhost)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ jobs:
- name: Restart HuggingFace Spaces Build
run: |
poetry run python ./scripts/factory_restart_space.py --space "Langflow/Langflow-Preview" --token ${{ secrets.HUGGINGFACE_API_TOKEN }}
poetry run python ./scripts/factory_restart_space.py --space "Langflow/Langflow" --token ${{ secrets.HUGGINGFACE_API_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/python_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
poetry env use ${{ matrix.python-version }}
poetry install
- name: Run unit tests
timeout-minutes: 12
run: |
make unit_tests
- name: Test CLI
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/typescript_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
cd src/frontend
npx playwright test --trace on --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --workers 2
continue-on-error: true
timeout-minutes: 12

# If the test fails, set a flag to indicate that the shard failed
- name: Set failure flag
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,4 @@ prof/*
src/frontend/temp
*-shm
*-wal
.history
5 changes: 4 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "0.2.0",
"configurations": [

{
"name": "Debug Backend",
"type": "debugpy",
Expand All @@ -22,7 +23,8 @@
"jinja": true,
"justMyCode": false,
"env": {
"LANGFLOW_LOG_LEVEL": "debug"
"LANGFLOW_LOG_LEVEL": "debug",
"LANGFLOW_PROMETHEUS_PORT": "9090"
},
"envFile": "${workspaceFolder}/.env"
},
Expand All @@ -38,6 +40,7 @@
"--env-file",
"${workspaceFolder}/.env"
],
// "python": "/path/to/your/python_env/python", // Replace with the path to your Python executable
"jinja": true,
"justMyCode": false
},
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@

# 📝 Content

- [](#)
- [📝 Content](#-content)
- [📦 Get Started](#-get-started)
- [🎨 Create Flows](#-create-flows)
- [Deploy](#deploy)
- [DataStax Langflow](#datastax-langflow)
- [Deploy Langflow on Hugging Face Spaces](#deploy-langflow-on-hugging-face-spaces)
- [Deploy Langflow on Google Cloud Platform](#deploy-langflow-on-google-cloud-platform)
- [Deploy on Railway](#deploy-on-railway)
- [Deploy on Render](#deploy-on-render)
Expand All @@ -64,6 +68,13 @@ You can install Langflow with pip:
# Make sure you have >=Python 3.10 installed on your system.
python -m pip install langflow -U
```
Or

If you would like to install from your cloned repo, you can build and install Langflow's frontend and backend with:

```shell
make install_frontend && make build_frontend && make install_backend
```

Then, run Langflow with:

Expand Down
31 changes: 13 additions & 18 deletions deploy/.env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
DOMAIN=localhost
STACK_NAME=langflow-stack
ENVIRONMENT=development

TRAEFIK_PUBLIC_NETWORK=traefik-public
TRAEFIK_TAG=langflow-traefik
TRAEFIK_PUBLIC_TAG=traefik-public


# Langflow backend configuration
LANGFLOW_LOG_LEVEL=debug
LANGFLOW_SUPERUSER=superuser
LANGFLOW_SUPERUSER_PASSWORD=superuser
LANGFLOW_NEW_USER_IS_ACTIVE=False


# Langflow frontend configuration
BACKEND_URL=http://backend:7860

# RabbitMQ configuration
RABBITMQ_DEFAULT_USER=langflow
RABBITMQ_DEFAULT_PASS=langflow
Expand All @@ -17,17 +27,15 @@ DB_HOST=db
DB_PORT=5432
DB_NAME=langflow

# Logging configuration
LOG_LEVEL=debug

# DB configuration
POSTGRES_USER=langflow
POSTGRES_PASSWORD=langflow
POSTGRES_DB=langflow
POSTGRES_PORT=5432

# Flower configuration
LANGFLOW_CACHE_TYPE=redis
# Disable until https://github.com/langflow-ai/langflow/pull/2655 gets released
#LANGFLOW_CACHE_TYPE=redis
LANGFLOW_REDIS_HOST=result_backend
LANGFLOW_REDIS_PORT=6379
LANGFLOW_REDIS_DB=0
Expand All @@ -38,20 +46,7 @@ BROKER_URL=amqp://langflow:langflow@broker:5672
RESULT_BACKEND=redis://result_backend:6379/0
C_FORCE_ROOT="true"

# Frontend configuration
VITE_PROXY_TARGET=http://backend:7860/api/
BACKEND_URL=http://backend:7860

# PGAdmin configuration
PGADMIN_DEFAULT_EMAIL=[email protected]
PGADMIN_DEFAULT_PASSWORD=admin

# OpenAI configuration (for testing purposes)
OPENAI_API_KEY=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

# Superuser configuration
LANGFLOW_SUPERUSER=superuser
LANGFLOW_SUPERUSER_PASSWORD=superuser

# New user configuration
LANGFLOW_NEW_USER_IS_ACTIVE=False
21 changes: 21 additions & 0 deletions deploy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Run Langflow


## Docker compose
To run Langflow with Docker compose, you need to have Docker and Docker compose installed on your machine. You can install Docker and Docker compose by following the instructions on the [official Docker documentation](https://docs.docker.com/get-docker/).

The docker-compose file uses `latest` tag; it's recommended to pull the latest version of the images before running the docker-compose file.

```bash
docker compose pull
```

To start the Langflow services, run the following command:

```bash
docker compose up
```

After running the command, you can access the Langflow services at the following url: http://localhost:80.

Edit the `.env` file to change the port or other configurations.
2 changes: 0 additions & 2 deletions deploy/docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.8"

services:
proxy:
ports:
Expand Down
Loading

0 comments on commit 0152734

Please sign in to comment.