Sign inSign up

quodt/emq-docker

By quodt

•Updated over 9 years ago

EMQ (Erlang MQTT Broker)

Image
0

5.2K

quodt/emq-docker repository overview

⁠EMQ Docker

EMQ (Erlang MQTT Broker) is a distributed, massively scalable, highly extensible MQTT message broker written in Erlang/OTP.

Current docker image size: 37.1 MB

⁠Get emqttd

You can build this docker image by yourself.

git clone -b master https://github.com/emqtt/emq_docker.git
cd emq_docker
docker build -t emq:latest .
⁠Run emqttd

Execute some command under this docker image

docker run --rm -ti -v `pwd`:$(somewhere) emq/$(image) $(somecommand)

For example

docker run --rm -ti --name emq -p 18083:18083 -p 1883:1883 emq:latest

⁠Configuration

Use the environment variable to configure the EMQ docker container

⁠EMQ Configuration
OprtionsDefaultDescription
EMQ_NAMEcontainer nameemq node short name
EMQ_HOSTcontainer IPemq node host, IP or FQDN
EMQ_NODE_NAMEEMQ_NAME@EMQ_HOSTlike email address
EMQ_NODE_COOKIEemq_dist_cookiecookie for cluster
EMQ_PROCESS_LIMIT2097152erlang vm process limit
EMQ_MAX_PORTS1048576erlang vm max ports
EMQ_LOG_CONSOLEfilelog console output method
EMQ_LOG_LEVELerrorlog console level
EMQ_ALLOW_ANONYMOUStrueallow mqtt anonymous login
EMQ_TCP_PORT1883MQTT TCP port
EMQ_TCP_ACCEPTORS64MQTT TCP acceptors
EMQ_TCP_MAX_CLIENTS1000000MQTT TCP max clients
EMQ_SSL_PORT8883MQTTS TCP/SSL port
EMQ_SSL_ACCEPTORS32MQTTS TCP/SSL acceptors
EMQ_SSL_MAX_CLIENTS500000MQTTS TCP/SSL max clients
EMQ_HTTP_PORT8083HTTP/WS port
EMQ_HTTP_ACCEPTORS64HTTP/WS acceptors
EMQ_HTTP_MAX_CLIENTS1000000HTTP/WS max clients
EMQ_HTTPS_PORT8084HTTPS/WSS port
EMQ_HTTPS_ACCEPTORS32HTTPS/WSS acceptors
EMQ_HTTPS_MAX_CLIENTS500000HTTPS/WSS max clients
EMQ_MAX_PACKET_SIZE64KBMax Packet Size Allowed

For example, set mqtt tcp port to 1883

docker run --rm -ti --name emq -e "EMQ_TCP_PORT=1883" -p 18083:18083 -p 1883:1883 emq:latest

⁠EMQ Loaded Plugins Configuration
OprtionsDefaultDescription
EMQ_LOADED_PLUGINSsee content belowdefault plugins emq loaded

Default environment variable EMQ_LOADED_PLUGINS, including

  • emq_recon
  • emq_dashboard
  • emq_mod_presence
  • emq_mod_retainer
  • emq_mod_subscription
# The default EMQ_LOADED_PLUGINS env
EMQ_LOADED_PLUGINS="emq_recon,emq_dashboard,emq_mod_presence,emq_mod_retainer,emq_mod_subscription"

For example, load emq_auth_redis plugin, set it into EMQ_LOADED_PLUGINS and use any separator to separates it.

You can use comma

EMQ_LOADED_PLUGINS="emq_auth_redis,emq_recon,emq_dashboard,emq_mod_presence,emq_mod_retainer,emq_mod_subscription"

You can use space

EMQ_LOADED_PLUGINS="emq_auth_redis emq_recon emq_dashboard emq_mod_presence emq_mod_retainer emq_mod_subscription"

You can use other separator that you want

EMQ_LOADED_PLUGINS="emq_auth_redis | emq_recon | emq_dashboard | emq_mod_presence | emq_mod_retainer | emq_mod_subscription"

All the plugin you defined in env EMQ_LOADED_PLUGINS will be loaded.

Tag summary

Content type

Image

Digest

Size

18.5 MB

Last updated

over 9 years ago

docker pull quodt/emq-docker