* feat: allow trust proxy setting to be configured via environment variable * fix: restore HTTP_DENY_LIST in .env.example after merge conflict * feat: add conditional handling for trust proxy * feat: add trust proxy environment variable documentation * feat: add trust proxy environment variable sample value * fix: handle empty trust proxy string in docker environment --------- Co-authored-by: Henry Heng <henryheng@flowiseai.com> |
||
|---|---|---|
| .. | ||
| healthcheck | ||
| .env.example | ||
| Dockerfile | ||
| README.md | ||
| docker-compose.yml | ||
README.md
Flowise Worker
By utilizing worker instances when operating in queue mode, Flowise can be scaled horizontally by adding more workers to handle increased workloads or scaled down by removing workers when demand decreases.
Here’s an overview of the process:
- The primary Flowise instance sends an execution ID to a message broker, Redis, which maintains a queue of pending executions, allowing the next available worker to process them.
- A worker from the pool retrieves a message from Redis. The worker starts execute the actual job.
- Once the execution is completed, the worker alerts the main instance that the execution is finished.
How to use
Setting up Main Server:
- Follow setup guide
- In the
.env.example, setup all the necessary env variables forQUEUE CONFIGURATION
Setting up Worker:
- Navigate to
docker/workerfolder - In the
.env.example, setup all the necessary env variables forQUEUE CONFIGURATION. Env variables for worker must match the one for main server. Change theWORKER_PORTto other available port numbers to listen for healthcheck. Ex: 5566 docker compose up -d- You can bring the worker container down by
docker compose stop
Entrypoint:
Different from main server image which is using flowise start, entrypoint for worker is pnpm run start-worker. This is because the worker's Dockerfile build the image from source files via pnpm build instead of npm registry via RUN npm install -g flowise.