Skip to content

AntoineGagne/mqtt-simulator

Repository files navigation

mqtt-simulator

https://travis-ci.org/AntoineGagne/mqtt-simulator.svg?branch=master https://ci.appveyor.com/api/projects/status/glyeekdu4vum33ht/branch/master?svg=true
Author:Antoine Gagné

1   Installation

1.1   Local Build

To build the runnable release, you need to have Erlang with OTP 21 and above. You also need rebar3. Then, you can run the following command:

rebar3 as prod release

1.2   Docker Image

To build this image, you can use the following command:

docker build -f Dockerfile -t "${name_of_the_image}" .

2   Usage

2.1   From Local Build

If you built the release, you can run it with:

./_build/prod/rel/mqtt_simulator/bin/mqtt_simulator foreground

2.2   Docker

After building the image, you can run the image by using the following command:

docker run \
    --detach \
    --name "${name_of_the_running_container}" \
    --publish "${port_on_host}:${port_of_simulator:-8000}" \
    "${name_of_the_image}"

3   Development

3.1   Running all the tests and linters

You can run all the tests and linters with the rebar3 alias:

rebar3 check