Comments (10)
@cogscides I got langflow working w/ Docker and nginx locally (VirtualBox Ubuntu VM hosted on win11; containers are running on Ubuntu)
It requires a code change in langflow/backend/langflow_backend/__main__.py
(Docker cannot use loopback IP, needs to be 0.0.0.0
)
docker-compose.yml
version: '3'
services:
langflow-nginx:
image: nginx:1.19-alpine
container_name: langflow-nginx
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "80"
depends_on:
- langflow-backend
langflow-backend:
build:
context: ./
dockerfile: ./python.Dockerfile
container_name: langflow-backend
image: langflow-backend-python
ports:
- "5003:5003"
entrypoint:
- bash
tty: true
stdin_open: true
nginx.conf
upstream langflow-backend-server {
server langflow-backend:5003;
}
server {
listen 80;
server_name langflow.dev.x.com; # change this to your hostname
root /langflow;
location / {
proxy_pass http://langflow-backend-server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
ensure langflow is installed w/ pip
sudo docker exec -it langflow-backend sh -c "cd /langflow && python3 -m venv env && . env/bin/activate && pip3 install langflow"
then start the backend with the following command
sudo docker exec -it langflow-backend sh -c ". env/bin/activate && langflow"
then hit the domain langflow.dev.x.com
with your browser
@ogabrielluiz I'll make a PR for langflow/backend/langflow_backend/__main__.py
if you're interested.
from langflow.
Second one. I mean ability to deploy via docker and than use it as API.
Sharing chains also would be very nice. It's very similar to what n8n do.
from langflow.
from langflow.
Git cloned and then ran docker compose up
in the langflow directory.
Seemed to spin up fine, but I'm getting errors when I go to localhost:3000
.
Keep getting proxy error.
Running on linux mint, but that shouldn't cause any issues since it's in docker.
See screenshots.
from langflow.
Hey @cogscides!
I'm not sure I understand it.
Do you mean a person uses another person's flow or just deploy with an external IP for a local network?
The external IP (like streamlit) is something I'm exploring today, actually.
from langflow.
disregard my post 😳 just saw this update:
from langflow.
Hey, Mike! Thanks for the post.
We've made some changes to how we deploy it but we are still not sure if it is the best approach.
Docker compose now runs a script to add a proxy when running locally for development and when running through langflow
the frontend just calls fetch
which calls the API directly.
from langflow.
This is a proxy problem. You might want to check the proxy attribute in the package.json.
It seems the backend is not running or the proxy is pointing to the wrong url.
from langflow.
I have the same issue running the docker containers with WSL. The default, http://localhost:7860 gets the same proxy error:
langflow-frontend-1 | Proxy error: Could not proxy request /favicon.ico from 127.0.0.1:3000 to http://localhost:7860.
langflow-frontend-1 | See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
but I can access that URL and http://localhost:7860/all in the browser:
langflow-backend-1 | INFO: 172.19.0.1:47462 - "GET /all HTTP/1.1" 200 OK
langflow-backend-1 | INFO: 172.19.0.1:47462 - "GET /favicon.ico HTTP/1.1" 404 Not Found
I do not see any connection attempts in the backend logs while opening the frontend.
System:
Windows 11 build 22621
WSL Ubuntu 20.04
Docker engine v20.10.23
from langflow.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from langflow.
Related Issues (20)
- [Feature Request] Changing History: Enhancing Flow Modification History with Recovery and Named Snapshots
- [Feature Request] File Input to Chatinput: Enabling File Uploads with Configurable Types and Expiry Options
- [Feature Request] S3 Integration: Enabling File Management Through Amazon S3 in Admin Panel
- [Feature Request] Enhancements to Langflow Store: Web-Based Component Integration and Synchronization Options for Updated Flows
- [Feature Request] Components Direct Connection: Displaying Connectable Components in Sidebar on Drag Actions HOT 2
- [Feature Request] Components Detail: Advanced Editing with Double-Click for Enhanced Usability
- [Feature Request] Case Components Management: Integrating Conditional Logic into Langflow with Custom Component Status Fields
- [Feature Request] Webhook Components: Explicit Development and URL Provision for Enhanced Flow Triggering in Langflow HOT 1
- [Feature Request] Vectorstore Viewing: Utilizing Langchain's Call Function for Detailed Viewing of Vector Similarity and Component Features
- [Feature Request] SQL Database Viewing: Execute SQL Queries Directly Within DB Component for Enhanced CRUD Operations
- [Feature Request] Async Components: Implement Refresh and Bulk Update Features for Custom Components in Langflow
- [Feature Request] Flow Schedule: Implement Time and Call Limitations on Flows to Prevent Overuse and Excessive Costs
- [Feature Request] Plugin Deployment: Enable Direct Configuration and Deployment of Components like Langfuse and Ollama Using Kubernetes
- [Feature Request] Langflow Graph: Integrate Direct Management Tools to Replace LangGraph with Equivalent Functionalities
- devcontainers broken with latest chromadb HOT 4
- API: input_value is ignored and not passed to Chat Input HOT 2
- Starting all from Docker image fails HOT 4
- Startup failed HOT 9
- how to get stream response from langflow flow api? HOT 1
- PyPDF is no longer available on 1.0.x HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langflow.