Files
flow/docker_example/README.md
T
zeekay 488de4eb05 merge: upstream/main (sync, brand preserved)
# Conflicts:
#	.github/workflows/docs-update-openapi.yml
#	AGENTS.md
#	AGENTS.md~upstream_main
#	CLAUDE.md
#	CLAUDE.md~upstream_main
#	docker_example/docker-compose.yml
#	src/backend/base/flow/agentic/flows/TranslationFlow.json
#	src/backend/base/flow/agentic/flows/langflow_assistant.py
#	src/backend/base/flow/agentic/helpers/code_security.py
#	src/backend/base/flow/agentic/helpers/input_sanitization.py
#	src/backend/base/flow/agentic/helpers/streaming_retry.py
#	src/backend/base/flow/alembic/versions/8255e9fc18d9_add_name_to_deployment_provider_account.py
#	src/backend/base/flow/alembic/versions/a1b2c3d4e5f6_convert_provider_key_and_deployment_.py
#	src/backend/base/flow/alembic/versions/c0d2ce43b315_add_flow_version_deployment_attachment_.py
#	src/backend/base/flow/alembic/versions/d306e5c17c41_add_api_key_hash_column_to_apikey_table.py
#	src/backend/base/flow/alembic/versions/ef4b036b585d_add_session_metadata_column_to_message_.py
#	src/backend/base/flow/api/utils/flow_utils.py
#	src/backend/base/flow/api/utils/zip_utils.py
#	src/backend/base/flow/api/v1/flow_events.py
#	src/backend/base/flow/api/v1/flows_helpers.py
#	src/backend/base/flow/api/v1/mappers/__init__.py
#	src/backend/base/flow/api/v1/mappers/deployments/RULES.md
#	src/backend/base/flow/api/v1/mappers/deployments/__init__.py
#	src/backend/base/flow/api/v1/mappers/deployments/base.py
#	src/backend/base/flow/api/v1/mappers/deployments/contracts.py
#	src/backend/base/flow/api/v1/mappers/deployments/helpers.py
#	src/backend/base/flow/api/v1/mappers/deployments/registry.py
#	src/backend/base/flow/api/v1/mappers/deployments/sync.py
#	src/backend/base/flow/api/v1/mappers/deployments/watsonx_orchestrate/__init__.py
#	src/backend/base/flow/api/v1/mappers/deployments/watsonx_orchestrate/mapper.py
#	src/backend/base/flow/api/v1/mappers/deployments/watsonx_orchestrate/payloads.py
#	src/backend/base/flow/api/v1/projects_files.py
#	src/backend/base/flow/api/v1/projects_mcp_helpers.py
#	src/backend/base/flow/services/cache/disk.py
#	src/backend/base/flow/services/database/models/deployment/exceptions.py
#	src/backend/base/flow/services/database/models/deployment/guards.py
#	src/backend/base/flow/services/database/models/deployment/orm_guards.py
#	src/backend/base/flow/services/database/models/deployment_provider_account/schemas.py
#	src/backend/base/flow/services/database/models/deployment_provider_account/utils.py
#	src/backend/base/flow/services/tracing/span_sorting.py
#	src/backend/base/flow/tests/api/v1/test_deployment_guard_delete_endpoints.py
#	src/backend/base/flow/tests/services/database/models/deployment/test_deployment_guard_triggers.py
#	src/backend/base/flow/tests/services/database/models/deployment/test_exceptions.py
#	src/backend/base/flow/tests/services/database/models/deployment/test_guards.py
#	src/backend/base/flow/tests/services/database/models/deployment_provider_account/test_utils.py
#	src/backend/base/langflow/api/v1/__init__.py
#	src/backend/tests/unit/agentic/flows/test_langflow_assistant.py
#	src/frontend/Dockerfile
#	src/lfx/src/lfx/base/models/unified_models.py
2026-06-02 10:52:30 -07:00

2.0 KiB

Running Hanzo Flow with Docker

This guide will help you get Hanzo Flow up and running using Docker and Docker Compose.

Prerequisites

  • Docker
  • Docker Compose

Steps

  1. Clone the Hanzo Flow repository:

    git clone https://github.com/hanzoai/flow.git
    
  2. Navigate to the docker_example directory:

    cd flow/docker_example
    
  3. Run the Docker Compose file:

    docker compose up
    

Hanzo Flow will now be accessible at http://localhost:7860/.

Docker Compose Configuration

The Docker Compose configuration spins up two services: hanzoflow and postgres.

Hanzo Flow Service

The hanzoflow service uses the hanzoflowai/hanzoflow:latest Docker image and exposes port 7860. It depends on the postgres service.

Environment variables:

  • HANZOFLOW_DATABASE_URL: The connection string for the PostgreSQL database.
  • HANZOFLOW_CONFIG_DIR: The directory where Hanzo Flow stores logs, file storage, monitor data, and secret keys.

Volumes:

  • hanzoflow-data: This volume is mapped to /app/hanzoflow in the container.

PostgreSQL Service

The postgres service uses the postgres:16-trixie Docker image and exposes port 5432. The image is pinned to a specific Debian base (trixie, Debian 13) so the postgres:16 tag cannot silently roll its underlying OS, which would otherwise produce a glibc collation version mismatch warning on existing data volumes.

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:

  • hanzoflow-postgres: This volume is mapped to /var/lib/postgresql/data in the container.

Switching to a Specific Version

If you want to use a specific version of Hanzo Flow, you can modify the image field under the hanzoflow service in the Docker Compose file. For example, to use version 1.0-alpha, change hanzoflowai/hanzoflow:latest to hanzoflowai/hanzoflow:1.0-alpha.