docker.recipes

Bull + Bull Board

intermediate

Node.js job queue with monitoring dashboard.

Overview

Bull is a Redis-based queue library for Node.js that enables background job processing with features like delayed jobs, job prioritization, rate limiting, and automatic retries. Originally created to handle asynchronous task processing in Node.js applications, Bull has become a cornerstone for building scalable microservices that need reliable job scheduling and execution. Bull Board complements this by providing a web-based monitoring dashboard that visualizes queue statistics, job status, and system performance in real-time. This stack combines Bull's robust job processing capabilities with Redis's high-performance in-memory storage and Bull Board's intuitive monitoring interface. Redis serves as the message broker and job storage backend, ensuring jobs persist across application restarts while maintaining sub-millisecond response times. Bull Board connects to the same Redis instance to provide live insights into queue health, failed job analysis, and throughput metrics without requiring additional database setup. Development teams building Node.js applications with background processing requirements will find this combination particularly valuable. E-commerce platforms processing order workflows, SaaS applications handling user notifications, and data processing pipelines benefit from Bull's reliability combined with Bull Board's operational visibility. The stack is especially useful for teams transitioning from simple setTimeout-based processing to enterprise-grade job management with proper monitoring and failure handling.

Key Features

  • Priority-based job scheduling with weighted queue processing
  • Automatic job retry mechanisms with exponential backoff strategies
  • Delayed job execution for scheduled tasks and time-based workflows
  • Real-time job progress tracking with custom progress indicators
  • Rate limiting capabilities to prevent API throttling and resource exhaustion
  • Job concurrency control with configurable worker limits per queue
  • Web-based dashboard showing queue statistics, failed jobs, and processing metrics
  • Redis persistence ensuring job durability across application restarts

Common Use Cases

  • 1E-commerce order processing workflows with payment verification and inventory updates
  • 2Email and notification delivery systems with retry logic for failed sends
  • 3Image and video processing pipelines for user-generated content
  • 4Data ETL jobs for analytics and reporting dashboards
  • 5Scheduled maintenance tasks and database cleanup operations
  • 6Social media content moderation and automated posting systems
  • 7Financial transaction processing with fraud detection workflows

Prerequisites

  • Docker and Docker Compose installed on the host system
  • Minimum 512MB RAM for Redis data storage and job queue operations
  • Port 3000 available for Bull Board dashboard access
  • Basic understanding of Node.js job queue concepts and Redis data structures
  • Network connectivity for Redis communication between Bull and Bull Board containers

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 redis:
3 image: redis:alpine
4 container_name: bull-redis
5 volumes:
6 - redis_data:/data
7 networks:
8 - bull
9
10 bull-board:
11 image: deadly0/bull-board:latest
12 container_name: bull-board
13 environment:
14 REDIS_HOST: redis
15 REDIS_PORT: 6379
16 ports:
17 - "3000:3000"
18 depends_on:
19 - redis
20 networks:
21 - bull
22
23volumes:
24 redis_data:
25
26networks:
27 bull:
28 driver: bridge

.env Template

.env
1# Configure your Bull queues

Usage Notes

  1. 1Docs: https://docs.bullmq.io/
  2. 2Bull Board dashboard at http://localhost:3000
  3. 3Add queues in Node.js: new Queue('my-queue', { connection })
  4. 4Monitor job status, progress, failed jobs, and retries
  5. 5BullMQ (v4+) recommended over Bull for new projects
  6. 6Redis-backed - jobs persist across restarts

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

redis
redis:
  image: redis:alpine
  container_name: bull-redis
  volumes:
    - redis_data:/data
  networks:
    - bull
bull-board
bull-board:
  image: deadly0/bull-board:latest
  container_name: bull-board
  environment:
    REDIS_HOST: redis
    REDIS_PORT: 6379
  ports:
    - "3000:3000"
  depends_on:
    - redis
  networks:
    - bull

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 redis:
5 image: redis:alpine
6 container_name: bull-redis
7 volumes:
8 - redis_data:/data
9 networks:
10 - bull
11
12 bull-board:
13 image: deadly0/bull-board:latest
14 container_name: bull-board
15 environment:
16 REDIS_HOST: redis
17 REDIS_PORT: 6379
18 ports:
19 - "3000:3000"
20 depends_on:
21 - redis
22 networks:
23 - bull
24
25volumes:
26 redis_data:
27
28networks:
29 bull:
30 driver: bridge
31EOF
32
33# 2. Create the .env file
34cat > .env << 'EOF'
35# Configure your Bull queues
36EOF
37
38# 3. Start the services
39docker compose up -d
40
41# 4. View logs
42docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/bull-board/run | bash

Troubleshooting

  • Bull Board shows empty dashboard: Ensure your Node.js application is creating queues with the same Redis connection parameters
  • Jobs stuck in waiting state: Check Redis memory usage and increase maxmemory limit or enable memory eviction policies
  • Connection refused errors: Verify Redis container is running and accessible on the bull network with correct hostname 'redis'
  • Jobs not processing: Confirm your Node.js workers are consuming from the correct queue names and Redis host configuration
  • Dashboard not updating: Restart Bull Board container to refresh Redis connection and clear any cached queue metadata
  • High memory usage in Redis: Enable Redis persistence (RDB/AOF) and configure appropriate job TTL settings to prevent memory leaks

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space