Skip to content
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

fix: adjust LANGFLOW_CONFIG_DIR to prevent permission error #6095

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions docker_example/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
version: "3.8"

services:
langflow:
image: langflowai/langflow:latest # or another version tag on https://hub.docker.com/r/langflowai/langflow
image: langflowai/langflow:latest # or another version tag on https://hub.docker.com/r/langflowai/langflow
pull_policy: always # set to 'always' when using 'latest' image
ports:
- "7860:7860"
Expand All @@ -11,7 +9,7 @@ services:
environment:
- LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
# This variable defines where the logs, file storage, monitor data and secret keys are stored.
- LANGFLOW_CONFIG_DIR=/app/langflow
- LANGFLOW_CONFIG_DIR=app/langflow
volumes:
- langflow-data:/app/langflow

Expand All @@ -21,8 +19,8 @@ services:
POSTGRES_USER: langflow
POSTGRES_PASSWORD: langflow
POSTGRES_DB: langflow
expose:
- 5432
ports:
- "5432:5432"
Comment on lines +22 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make this change? Expose is safer, isn't it?

Copy link
Member Author

@italojohnny italojohnny Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great question that brings up an important point about the philosophy behind Langflow. Expose is indeed "safer" in the sense that it restricts access to Docker's internal network, preventing accidental exposure. However, it also creates an additional hurdle for users who want to access Langflow from other machines on the network.

At the end of the day, this decision reflects a common trade-off in software design: should we prioritize restrictions to prevent misuse, or should we prioritize ease of use and trust the user to take responsibility?

Personally, as a user, I’d prefer something that works out of the box without extra configuration. With that in mind, I took the liberty of simplifying things a little here.

volumes:
- langflow-postgres:/var/lib/postgresql/data

Expand Down
Loading