Re-apply brand changes (maintainer info, URLs, product name) that were overwritten by the upstream merge.
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
-
Clone the Hanzo Flow repository:
git clone https://github.com/hanzoai/flow.git -
Navigate to the
docker_exampledirectory:cd flow/docker_example -
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/hanzoflowin the container.
PostgreSQL Service
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:
hanzoflow-postgres: This volume is mapped to/var/lib/postgresql/datain 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.