Running JRebel Broker¶
You can run the broker as a standalone Java application or in a Docker container.
Run the broker as a standalone Java application¶
If your config.yml
is in:
The current directory, run
java -jar jrebel-broker.jar
.A different directory, run
java -Dbroker.config=C:/<path_to_config.yml> -jar jrebel-broker.jar
and replace<path_to_config.yml>
with the path to yourconfig.yml
file.
java -jar jrebel-broker.jar
Run the broker via a Docker container¶
Create a
docker-compose.yml
file. For reference, an example is shown below.
services:
broker:
image: openjdk:21-bookworm
volumes:
- ./dist/:/broker/dist/ # Mount directory containing jrebel-broker.jar.
- ./config.yml:/broker/config.yml # Mount your configuration file.
- ./rebelbroker.lic:/root/.jrbroker/rebelbroker.lic # Mount your license file.
ports:
- '7000:7000' # Map public connector port.
- '8000:8000' # Map admin UI port (adjust to your config.yml).
working_dir: /broker
environment:
JAVA_TOOL_OPTIONS: -Dlogging.file.name=/var/log/broker/broker.log
entrypoint: /bin/sh -c 'exec java -jar /broker/dist/jr-broker-*.jar'
In the same directory as your docker-compose.yml
file, run docker compose up
.