@@ -22,9 +22,9 @@ There is an [Alternative Image in GitHub Packages](HUB-README.md#alternative-ima
2222If you are using a Windows operating system, check the tutorials mentioned in
2323[ ejabberd Docs > Docker Image] ( https://docs.ejabberd.im/admin/installation/#docker-image ) .
2424
25- # Start ejabberd
25+ ## Start ejabberd
2626
27- ## With default configuration
27+ ### With default configuration
2828
2929You can start ejabberd in a new container with the following command:
3030
@@ -47,7 +47,7 @@ If needed, you can restart the stopped ejabberd container with:
4747docker restart ejabberd
4848```
4949
50- ## Start with Erlang console attached
50+ ### Start with Erlang console attached
5151
5252If you would like to start ejabberd with an Erlang console attached you can use the ` live ` command:
5353
@@ -57,7 +57,7 @@ docker run -it -p 5222:5222 ejabberd/ecs live
5757
5858This command will use default configuration file and XMPP domain "localhost".
5959
60- ## Start with your configuration and database
60+ ### Start with your configuration and database
6161
6262This command passes the configuration file using the volume feature
6363and shares the local directory to store database:
@@ -67,9 +67,9 @@ mkdir database
6767docker run -d --name ejabberd -v $( pwd) /ejabberd.yml:/home/ejabberd/conf/ejabberd.yml -v $( pwd) /database:/home/ejabberd/database -p 5222:5222 ejabberd/ecs
6868```
6969
70- # Next steps
70+ ## Next steps
7171
72- ## Register the administrator account
72+ ### Register the administrator account
7373
7474The default ejabberd configuration has already granted admin privilege
7575to an account that would be called ` admin@localhost ` ,
@@ -81,31 +81,31 @@ You can register this account using the `ejabberdctl` script, for example:
8181docker exec -it ejabberd bin/ejabberdctl register admin localhost passw0rd
8282```
8383
84- ## Check ejabberd log files
84+ ### Check ejabberd log files
8585
8686Check the ejabberd log file in the container:
8787
8888``` bash
8989docker exec -it ejabberd tail -f logs/ejabberd.log
9090```
9191
92- ## Inspect the container files
92+ ### Inspect the container files
9393
9494The container uses Alpine Linux. You can start a shell there with:
9595
9696``` bash
9797docker exec -it ejabberd sh
9898```
9999
100- ## Open ejabberd debug console
100+ ### Open ejabberd debug console
101101
102102You can open a live debug Erlang console attached to a running container:
103103
104104``` bash
105105docker exec -it ejabberd bin/ejabberdctl debug
106106```
107107
108- ## CAPTCHA
108+ ### CAPTCHA
109109
110110ejabberd includes two example CAPTCHA scripts.
111111If you want to use any of them, first install some additional required libraries:
@@ -142,7 +142,7 @@ For more details about CAPTCHA options, please check the
142142documentation section.
143143
144144
145- ## Use ejabberdapi
145+ ### Use ejabberdapi
146146
147147When the container is running (and thus ejabberd), you can exec commands inside the container
148148using ` ejabberdctl` or any other of the available interfaces, see
@@ -184,9 +184,9 @@ Then you could register new accounts with this query:
184184docker exec -it ejabberd bin/ejabberdapi register --endpoint=http://127.0.0.1:5282/ --jid=admin@localhost --password=passw0rd
185185` ` `
186186
187- # Advanced container configuration
187+ # # Advanced container configuration
188188
189- # # Ports
189+ # ## Ports
190190
191191This container image exposes the ports :
192192
@@ -197,7 +197,7 @@ This container image exposes the ports:
197197- `1883` : Used for MQTT
198198- `4369-4399` : EPMD and Erlang connectivity, used for `ejabberdctl` and clustering
199199
200- # # Volumes
200+ # ## Volumes
201201
202202ejabberd produces two types of data : log files and database (Mnesia).
203203This is the kind of data you probably want to store on a persistent or local drive (at least the database).
@@ -216,7 +216,7 @@ All these files are owned by ejabberd user inside the container. Corresponding
216216you need to map this to valid `UID:GID` on your host to get read/write access on
217217mounted directories.
218218
219- # # Commands on start
219+ # ## Commands on start
220220
221221The ejabberdctl script reads the `CTL_ON_CREATE` environment variable
222222the first time the container is started,
@@ -236,7 +236,7 @@ Example usage (or check the [full example](#customized-example)):
236236 status
237237` ` `
238238
239- # # Clustering
239+ # ## Clustering
240240
241241When setting several containers to form a
242242[cluster of ejabberd nodes](https://docs.ejabberd.im/admin/guide/clustering/),
@@ -262,7 +262,7 @@ environment:
262262 - CTL_ON_CREATE=join_cluster ejabberd@main
263263` ` `
264264
265- # # Change Mnesia Node Name
265+ # ## Change Mnesia Node Name
266266
267267To use the same Mnesia database in a container with a different hostname,
268268it is necessary to change the old hostname stored in Mnesia.
@@ -272,7 +272,7 @@ This section is equivalent to the ejabberd Documentation
272272but particularized to containers that use this
273273ecs container image from ejabberd 23.01 or older.
274274
275- # ## Setup Old Container
275+ # ### Setup Old Container
276276
277277Let's assume a container running ejabberd 23.01 (or older) from
278278this ecs container image, with the database directory binded
@@ -299,7 +299,7 @@ docker exec -it $OLDCONTAINER bin/ejabberdctl status
299299docker exec -it $OLDCONTAINER grep "started in the node" logs/ejabberd.log
300300` ` `
301301
302- # ## Change Mnesia Node
302+ # ### Change Mnesia Node
303303
304304First of all let's store the Erlang node names and paths in variables.
305305In this example they would be :
@@ -364,7 +364,7 @@ docker exec -it $NEWCONTAINER bin/ejabberdctl registered_users localhost
364364you may want to remove the unneeded files :
365365the old container, the old Mnesia spool files, and the backup files.
366366
367- # ## Create Temporary Container
367+ # ### Create Temporary Container
368368
369369In case the old container that used the Mnesia database is not available anymore,
370370a temporary container can be created just to read the Mnesia database
@@ -399,9 +399,9 @@ Now that you have ejabberd running with access to the Mnesia database,
399399you can continue with step 2 of previous section
400400[Change Mnesia Node](#change-mnesia-node).
401401
402- # Generating ejabberd release
402+ # # Generating ejabberd release
403403
404- # # Configuration
404+ # ## Configuration
405405
406406Image is built by embedding an ejabberd Erlang/OTP standalone release in the image.
407407
@@ -425,9 +425,9 @@ Build ejabberd Community Server base image for a given ejabberd version:
425425./build.sh 18.03
426426` ` `
427427
428- # Composer Examples
428+ # # Composer Examples
429429
430- # # Minimal Example
430+ # ## Minimal Example
431431
432432This is the barely minimal file to get a usable ejabberd.
433433Store it as `docker-compose.yml` :
@@ -449,7 +449,7 @@ Create and start the container with the command:
449449docker-compose up
450450` ` `
451451
452- # # Customized Example
452+ # ## Customized Example
453453
454454This example shows the usage of several customizations :
455455it uses a local configuration file,
@@ -492,7 +492,7 @@ services:
492492 - ./database:/home/ejabberd/database
493493` ` `
494494
495- # # Clustering Example
495+ # ## Clustering Example
496496
497497In this example, the main container is created first.
498498Once it is fully started and healthy, a second container is created,
0 commit comments