divo_vernemq v0.1.0 DivoVernemq View Source

Defines a single-node "cluster" vernemq broker as a map compatible with divo for building a docker-compose file.

Link to this section Summary

Functions

Implements the Divo Stack behaviour to take a keyword list of defined variables specific to the DivoVernemq stack and returns a map describing the service definition of VerneMQ.

Link to this section Functions

Link to this function

gen_stack(envars)

View Source
gen_stack([tuple()]) :: map()

Implements the Divo Stack behaviour to take a keyword list of defined variables specific to the DivoVernemq stack and returns a map describing the service definition of VerneMQ.

Optional Configuration

  • allow_anonymous: Allow unauthenticated connections to the cluster. Defaults to :on

  • mqtt_port: The port on which the MQTT listener will be exposed to the host. The default

             port VerneMQ uses for MQTT is 1883. The only affects the port exposed to the host;
             within the container the VerneMQ broker is listening on port 1883.
  • ssl_mqtt_port: The port on which the MQTT over SSL communication will be exposed to the host.

                 The default port VerneMQ uses for MQTT over SSL is 8883. This only affects the
                 port exposed to the host; within the container, the VerneMQ broker is listening
                 on port 8883.
  • ws_mqtt_port: The port on which the MQTT over Websocket communication will be exposed to the host.

                The default port VerneMQ uses for MQTT over websockets is 8080. This only
                affects the port exposed to the host; within the container the VerneMQ broker
                is listening on port 8080.
  • stats_port: The port on which the statistics web service, including the status UI, is exposed

              to the host. The default port VerneMQ uses for the stats interface is 8888. This
              only affects the host port; within the container the VerneMQ broker is listening on
              port 8888. Set your browser to `localhost:<stats_port>/status` to view the UI.
  • log_level: The log level at which the VerneMQ broker will output messages. Defaults to :info.

  • users: A map of usernames and passwords to create records for file-based authentication. These

        are transparently converted to environment variables that are injected into the container
        in the form of `DOCKER_VERNEMQ_USER_<username>='password'`. Defaults to an empty map.
  • version: The version of the VerneMQ image to run. Defaults to latest.