docker_example/README.md
This guide will help you get LangFlow up and running using Docker and Docker Compose.
Clone the LangFlow repository:
git clone https://github.com/langflow-ai/langflow.git
Navigate to the docker_example directory:
cd langflow/docker_example
Run the Docker Compose file:
docker compose up
LangFlow will now be accessible at http://localhost:7860/.
The Docker Compose configuration spins up two services: langflow and postgres.
The langflow service uses the langflowai/langflow:latest Docker image and exposes port 7860. It depends on the postgres service.
Environment variables:
LANGFLOW_DATABASE_URL: The connection string for the PostgreSQL database.LANGFLOW_CONFIG_DIR: The directory where LangFlow stores logs, file storage, monitor data, and secret keys.Volumes:
langflow-data: This volume is mapped to /app/langflow in the container.The postgres service uses the postgres:16 Docker image and exposes port 5432.
Environment variables:
POSTGRES_USER: The username for the PostgreSQL database.POSTGRES_PASSWORD: The password for the PostgreSQL database.POSTGRES_DB: The name of the PostgreSQL database.Volumes:
langflow-postgres: This volume is mapped to /var/lib/postgresql/data in the container.If you want to use a specific version of LangFlow, you can modify the image field under the langflow service in the Docker Compose file. For example, to use version 1.0-alpha, change langflowai/langflow:latest to langflowai/langflow:1.0-alpha.