diff options
author | Badlop <badlop@process-one.net> | 2022-05-31 13:35:15 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2022-09-13 17:55:17 +0200 |
commit | 5ee1dc9e8d80d52ec9f3dd3f043dfdd4c90c303a (patch) | |
tree | 6fca595c16d44cccddc0f77d20624b01d01c4428 /CONTAINER.md | |
parent | Support ERL_DIST_PORT option to work without epmd (diff) |
Container: Support ERL_DIST_PORT
Diffstat (limited to 'CONTAINER.md')
-rw-r--r-- | CONTAINER.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/CONTAINER.md b/CONTAINER.md index 8f9c07ae8..d42a0ae6e 100644 --- a/CONTAINER.md +++ b/CONTAINER.md @@ -179,6 +179,7 @@ This container image exposes the ports: - `5443`: With encryption, used for admin interface, API, CAPTCHA, OAuth, Websockets and XMPP BOSH. - `1883`: Used for MQTT - `4369-4399`: EPMD and Erlang connectivity, used for `ejabberdctl` and clustering +- `5210`: Erlang connectivity when `ERL_DIST_PORT` is set, alternative to EPMD ### Volumes @@ -233,6 +234,23 @@ For this you can either: - edit `conf/ejabberdctl.cfg` and set variables `ERLANG_NODE` and `ERLANG_COOKIE` - set the environment variables `ERLANG_NODE_ARG` and `ERLANG_COOKIE` +Example to connect a local `ejabberdctl` to a containerized ejabberd: +1. When creating the container, export port 5210, and set `ERLANG_COOKIE`: +``` +docker run --name ejabberd -it \ + -e ERLANG_COOKIE=`cat $HOME/.erlang.cookie` \ + -p 5210:5210 -p 5222:5222 \ + ghcr.io/processone/ejabberd +``` +2. Set `ERL_DIST_PORT=5210` in ejabberdctl.cfg of container and local ejabberd +3. Restart the container +4. Now use `ejabberdctl` in your local ejabberd deployment + +To connect using a local `ejabberd` script: +``` +ERL_DIST_PORT=5210 _build/dev/rel/ejabberd/bin/ejabberd ping +``` + Example using environment variables (see full example [docker-compose.yml](https://github.com/processone/docker-ejabberd/issues/64#issuecomment-887741332)): ```yaml environment: |