-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images Not Displaying Correctly in langflow (1.0.5) Docker Container Behind Traefik Proxy #2408
Comments
Hello, @edumelocmrj! I'm here to help you with any issues you're experiencing while waiting for a human maintainer. Let's get to the bottom of this together. To resolve the issue with images not displaying correctly in your Langflow Docker container setup, you need to ensure that the version: "3.8"
services:
langflow:
image: langflowai/langflow:latest
ports:
- "7860:7860"
depends_on:
- postgres
environment:
- LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
- LANGFLOW_SUPERUSER=<MY-LOGIN>
- LANGFLOW_SUPERUSER_PASSWORD=<MY-PASS>
- LANGFLOW_NEW_USER_IS_ACTIVE=true
- LANGFLOW_AUTO_LOGIN=false
- LANGFLOW_HOST=0.0.0.0
- BACKEND_URL=https://langflow.my-domain.com/ # Ensure the trailing slash is included
labels:
- "traefik.enable=true"
- "traefik.http.routers.langflow.rule=Host(`langflow.my-domain.com`)" # My public FDN
- "traefik.http.routers.langflow.entrypoints=web,websecure"
- "traefik.http.routers.langflow.tls.certresolver=cloudflare"
- "traefik.http.services.langflow.loadbalancer.server.port=7860"
volumes:
- langflow-data:/var/lib/langflow
postgres:
image: postgres:16
environment:
POSTGRES_USER: langflow
POSTGRES_PASSWORD: langflow
POSTGRES_DB: langflow
ports:
- "5432:5432"
volumes:
- langflow-postgres:/var/lib/postgresql/data
volumes:
langflow-postgres:
langflow-data:
networks:
default:
name: langflow
external: false Ensure that the |
I am using it exactly as you suggested, but it doesn't work |
Up |
I am trying to implement langflow (1.0.5) as a Docker container protected by the Traefik proxy and managed by Portainer. The installation worked well, and langflow is fully operational. However, the images and icons presented by the service exposed on the Internet refer to "http://localhost:7860/..." and, obviously, they cannot be displayed at end user's browser. Scouring the source code, I saw that the environment variable "BACKEND_URL" (e.g., <img src={${BACKEND_URL.slice(0, BACKEND_URL.length - 1,)}${BASE_URL_API}files/profile_pictures/${userData?.profile_image ?? "Space/046-rocket.svg"} ?? profileCircle} className="h-7 w-7 shrink-0 focus-visible:outline-0"/>) should provide the public URL for the responses coming from the server, but the container ignores this variable and always displays the images as src=localhost:7860...". Does anyone have any tips?
This is my stack entries in portainer
services:
langflow:
image: langflowai/langflow:latest
ports:
- "7860:7860"
depends_on:
- postgres
environment:
- LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
#- LANGFLOW_CONFIG_DIR=/var/lib/langflow # If uncomment this line, langflow crashes---WHY???
- LANGFLOW_SUPERUSER=
- LANGFLOW_SUPERUSER_PASSWORD=
- LANGFLOW_NEW_USER_IS_ACTIVE=true
#- LANGFLOW_SECRET_KEY= # I prefer to fill from the application
- LANGFLOW_AUTO_LOGIN=false
- LANGFLOW_HOST=0.0.0.0
- BACKEND_URL=https://langflow.my-domain.com/ # Always put the slash '/' at the end
postgres:
image: postgres:16
environment:
POSTGRES_USER: langflow
POSTGRES_PASSWORD: langflow
POSTGRES_DB: langflow
ports:
- "5432:5432"
volumes:
- langflow-postgres:/var/lib/postgresql/data
volumes:
langflow-postgres:
langflow-data:
networks:
default:
name: langflow
external: false
The text was updated successfully, but these errors were encountered: