Docker Usage¶
Run Mergebot in a containerized environment using Docker.
Pull the Image¶
docker pull thehapyone/mergebot:latest
Run in Ondemand Mode¶
docker run --rm \
-v $(pwd)/config-gitlab.yaml:/config/config.yaml \
-e CONFIG_PATH=/config/config.yaml \
thehapyone/mergebot:latest ondemand --max-concurrency 4
Run in Webhook Mode¶
docker run --rm -p 8000:8000 \
-v $(pwd)/config-gitlab.yaml:/config/config.yaml \
-e CONFIG_PATH=/config/config.yaml \
thehapyone/mergebot:latest webhook --port 8000 --max-concurrency 2
Configure
GITLAB_WEBHOOK_SECRETorGITHUB_WEBHOOK_SECRET(e.g.-e GITLAB_WEBHOOK_SECRET=...) when running in webhook mode so incoming events are authenticated. Projects are discovered fromrepository.projects; adjust--max-concurrencyto limit parallel analyses. Sample configuration files are provided in the repo (example-config-gitlab.yaml,example-config-github.yaml).
Mount Custom Config¶
docker run --rm \
-v $(pwd)/mergebot/config.yaml:/home/appuser/mergebot/config.yaml \
thehapyone/mergebot:latest ondemand --max-concurrency 2 --interval 900
Adjust
--intervalto control how frequently ondemand scans repeat; omit it for a single pass.Tip: For Docker Compose instructions, see Docker Compose.