Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:FlowiseAI Flowise Docker Deployment

From Leeroopedia
Attribute Value
Page Name Docker_Deployment
Workflow Chatbot_Deployment
Repository FlowiseAI/Flowise
Domain Infrastructure, Deployment, DevOps
Source docker/docker-compose.yml:L1-146, docker/docker-compose-queue-prebuilt.yml, docker/docker-compose-queue-source.yml, docker/Dockerfile
Last Updated 2026-02-12 14:00 GMT

Overview

Technique for deploying Flowise as a containerized application using Docker Compose with configurable database and queue modes.

Description

Flowise can be deployed via Docker Compose in several configurations, ranging from a simple single-container setup to a distributed multi-service architecture with Redis-backed job queues.

Deployment Configurations

  1. Basic mode with SQLite (default): The simplest deployment uses a single flowise container with the flowiseai/flowise:latest image from Docker Hub. The default database is SQLite, stored in the mounted volume at ~/.flowise. This is suitable for development, testing, and small-scale deployments.
  1. PostgreSQL database mode: For production deployments, PostgreSQL can be configured as the database backend by setting DATABASE_TYPE, DATABASE_HOST, DATABASE_PORT, DATABASE_NAME, DATABASE_USER, and DATABASE_PASSWORD environment variables. This provides better concurrency, reliability, and scalability.
  1. Queue mode with Redis + BullMQ: For distributed processing, the queue mode separates the API server from worker processes. This configuration uses:
    • A Redis service for job queue management
    • A flowise main service for API handling
    • A flowise-worker service for processing predictions
    • Both services connect via a shared Docker network (flowise-net)
    • The MODE=queue environment variable enables queue mode

Environment Variables

Key environment variables control the deployment:

  • Authentication: JWT_AUTH_TOKEN_SECRET, JWT_REFRESH_TOKEN_SECRET, JWT_ISSUER, JWT_AUDIENCE, JWT_TOKEN_EXPIRY_IN_MINUTES, EXPRESS_SESSION_SECRET
  • Database: DATABASE_TYPE, DATABASE_HOST, DATABASE_PORT, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD, DATABASE_SSL
  • Server: PORT (default 3000), CORS_ORIGINS, IFRAME_ORIGINS
  • Storage: STORAGE_TYPE, BLOB_STORAGE_PATH, S3 settings, Google Cloud Storage settings
  • Security: SECRETKEY_PATH, SECRETKEY_STORAGE_TYPE, FLOWISE_SECRETKEY_OVERWRITE
  • Queue: MODE, QUEUE_NAME, REDIS_URL, REDIS_HOST, REDIS_PORT, WORKER_CONCURRENCY
  • Logging: DEBUG, LOG_PATH, LOG_LEVEL
  • Metrics: ENABLE_METRICS, METRICS_PROVIDER, OpenTelemetry settings

Health Checks

The Docker Compose configurations include health checks that poll http://localhost:${PORT}/api/v1/ping every 10 seconds with a 5-second timeout and 5 retries. The worker health check uses a dedicated /healthz endpoint on the worker port.

Volume Mounts

The default volume mount maps ~/.flowise on the host to /root/.flowise in the container. This directory stores:

  • SQLite database files (when using SQLite)
  • Secret keys
  • Log files
  • Blob storage files

Usage

Use this principle when deploying Flowise as a production service using containers. Apply when:

  • Setting up a self-hosted Flowise instance
  • Moving from development to production deployment
  • Scaling Flowise with distributed worker processing
  • Deploying Flowise in a container orchestration environment

Configuration Selection Guide

  • docker-compose.yml: Basic single-service deployment. Use for development, demos, and small-scale production with SQLite or external PostgreSQL.
  • docker-compose-queue-prebuilt.yml: Queue mode using pre-built Docker Hub images. Use for production deployments requiring distributed processing without building from source.
  • docker-compose-queue-source.yml: Queue mode building from source. Use for development and testing of the queue architecture or when custom modifications are needed.

Theoretical Basis

This technique implements the infrastructure-as-code deployment pattern. Docker Compose defines the complete deployment topology, enabling reproducible and portable deployments. Environment variables provide configuration without image modification.

Key architectural properties:

  • Image immutability: The pre-built flowiseai/flowise image is not modified at deployment time. All configuration is injected via environment variables, following the twelve-factor app methodology.
  • Service composition: Docker Compose enables defining multi-service topologies declaratively. The queue mode configuration demonstrates service dependency management (worker depends on Redis and Flowise main).
  • Network isolation: The flowise-net bridge network in queue mode configurations provides service-to-service communication while isolating services from the host network.
  • Volume persistence: Host volume mounts ensure data survives container restarts and upgrades. The consistent mount path (~/.flowise:/root/.flowise) maintains state across deployments.
  • Health-check driven orchestration: Health checks ensure the service is fully initialized before accepting traffic, with the start_period: 30s providing buffer for initial startup.
  • Delayed startup: The entrypoint /bin/sh -c "sleep 3; flowise start" provides a brief delay to allow dependent services (database, Redis) to become ready before the application starts.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment