From 3ba4cbb50f035df5fb8406f73e2d7beadf592c82 Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Fri, 2 Dec 2016 14:12:35 +0100 Subject: [PATCH] Expand README file --- ejabberd-mix/README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ejabberd-mix/README.md b/ejabberd-mix/README.md index e3a9654..69f7fe5 100644 --- a/ejabberd-mix/README.md +++ b/ejabberd-mix/README.md @@ -23,11 +23,23 @@ docker run --rm -v $(pwd):$(pwd) -w $(pwd) ejabberd/mix do deps.get, deps.compil ## Run ejabberd with mix command-line tool attached +You can customize the configuration by editing the file `config/ejabberd.yml`. As a default, you can run ejabberd with console attached on "localhost" domain: + ```bash docker run --rm -it -p 5222:5222 -p 5280:5280 -v $(pwd):$(pwd) -w $(pwd) --entrypoint="/usr/bin/iex" ejabberd/mix -S mix ``` -You can then create a user from Elixir and connect with an XMPP client. +You can then create a user from Elixir shell: + +```bash + +Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false] +Interactive Elixir (1.3.4) - press Ctrl+C to exit (type h() ENTER for help) +iex(1)> :ejabberd_auth.try_register("test", "localhost", "passw0rd") +{:atomic, :ok} +``` + +You can then connect with user test@localhost (password: passw0rd) on server on localhost port 5222 and use those parameters to connect with an XMPP client. ## Get into the container @@ -37,6 +49,15 @@ If you want to run Erlang command line, you can do so by opening a shell inside docker run -it -v $(pwd):$(pwd) -w $(pwd) --entrypoint="/bin/sh" ejabberd/mix ``` +## Getting Elixir version + +```bash +docker run -it --rm -v $(pwd):$(pwd) -w $(pwd) ejabberd/mix --version +Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false] + +Mix 1.3.4 +``` + ## Build the image Building the image is not needed if you simply want to use it. You can simply use the one from [ejabberd Docker Hub](https://hub.docker.com/u/ejabberd/dashboard/).