This is a production-ready, heavily optimized, Docker image for bull-board. It allows you to monitor your bull queues without coding a web server just for that, just launch the Docker image!
It supports bull and bullmq.
- 🔒 Optional auth integrated: I implemented some
Basicauth to secure the dashboard. - ⚡ Ultra performant: Behind the scenes it only has a
distrolessimage that launches a tiny fast web server with the Bull Board. - 🔧 Configurable: There are several
.envconfig options allowing you to customize the behavior of your image. - 👮 Secure: Auth, logging, CSP headers... everything integrated to improve your deployment (just remember, security is not guaranteed, you have to do your own work on that!)
docker run -p 3000:3000 nauverse/bull-boardThis code will expose the webserver on localhost:3000. It will also try to connect to your Redis instance on localhost:6379 (without any password, read below for more settings).
bullboard:
container_name: bullboard
image: nauverse/bull-board
restart: unless-stopped
pull_policy: always
ports:
- "3000:3000"This docker-compose.yaml file will launch the image and expose it at localhost:3000. Again, it will try to connect to your Redis instance on localhost:6379.
REDIS_URL- [Optional] A Redis URL with any connection param you need. By default it usesredis://localhost:6379.BULL_PREFIX- [Optional] Used to prefix your bull queue name. By default it usesbull.BULL_VERSION- [Optional] Version of the Bull lib to use. It can beBULLMQorBULL. By default it isBULLMQ.BASE_PATH- [Optional] The base URL where the internal web server will expose the board and all its resources. By default it is/.LOG_LEVEL- [Optional] The minimum log level to display. It can betrace,debug,info,warn,error,fatal. By default it isinfo.LOG_ANONYMIZE_IP- [Optional] A boolean to determine if the web server should anonymice any IP found in the request logs (for privacy complaint). By default it isfalse.USER_USERNAME- [Optional] A string containing the username used to identify the user. If added, you must also specify theUSER_PASSWORDenv var. If any of those are not set, the auth won't be enabled. By default it is not set.USER_PASSWORD- [Optional] A string containing the passoword used to identify the user. If added, you must also specify theUSER_USERNAMEenv var. If any of those are not set, the auth won't be enabled. By default it is not set.
services:
redis:
container_name: redis
restart: unless-stopped
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
image: redis:6
ulimits:
memlock: -1
ports:
- "6379:6379"
volumes:
- redis_data:/data
command:
[
"redis-server",
"--requirepass",
"${REDIS_PASSWORD}",
"--maxmemory-policy",
"noeviction",
]
healthcheck:
test:
- CMD-SHELL
- "redis-cli -a $${REDIS_PASSWORD} ping"
interval: 5s
timeout: 20s
retries: 10
bullboard:
container_name: bullboard
image: nauverse/bull-board
restart: unless-stopped
pull_policy: always
ports:
- "3000:3000"
environment:
REDIS_URL: ${REDIS_URL}
BULL_PREFIX: bull
USER_USERNAME: ${BULL_BOARD_AUTH_USER}
USER_PASSWORD: ${BULL_BOARD_AUTH_PASSWORD}
LOG_ANONYMIZE_IP: "true"
depends_on:
- redis
volumes:
redis_data:REDIS_PASSWORD=supersecurepassword
REDIS_URL=redis://default:${REDIS_PASSWORD}@redis:6379
BULL_BOARD_AUTH_USER="mysupersecretusername"
BULL_BOARD_AUTH_PASSWORD="anothersupersecurepassword"
Then launch it with:
docker compose up -dAnd stop it with:
docker compose down- Allow setting the uiConfig optional parameters using the
.envfile - Create tests for the HTTP server
- Improve the documentation
- Deploy it as a a single-file standalone executable (using the
buncompile option). I need to wait for that sincebundoes not exportnode_modulesinto the binary (yet) oven-sh/bun#8967 - ✅
Create a GitHub action to automatize the build process when there is a push to the main branch
-
Do not compile it to a single standalone executable with the
--minifyparam since it breaks the internal code. -
When publishing, make sure to change
<my_new_version_code>with the new version code (until I automatize the process).
