langflow/docker_example/docker-compose.yml
Kuba 294de475c1
chore: Use expose instead of ports in docker compose example (#5592)
This makes the postgres instance only reachable from the langflow container and allows it to spin up even if another process (e.g. another postgres instance) is running on the host and binds to the same port.
2025-01-08 16:43:14 +00:00

30 lines
829 B
YAML

version: "3.8"
services:
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"
depends_on:
- postgres
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.
volumes:
- langflow-data:/app/langflow
postgres:
image: postgres:16
environment:
POSTGRES_USER: langflow
POSTGRES_PASSWORD: langflow
POSTGRES_DB: langflow
expose:
- 5432
volumes:
- langflow-postgres:/var/lib/postgresql/data
volumes:
langflow-postgres:
langflow-data: