M docker/biboumi/README.rst => docker/biboumi/README.rst +23 -4
@@ 5,7 5,7 @@ Running
-------
This image does not embed any XMPP server. You need to have a running XMPP
-server (as an other docker container for example) first.
+server first: as an other docker image, or running on the host machine.
Assuming you have a running `prosody
<https://hub.docker.com/r/prosody/prosody/>`_ container already running and
@@ 22,6 22,19 @@ docker run --link prosody:xmpp \
biboumi
```
+If instead you already have an XMPP server running on the host machine, you
+can start the biboumi container like this:
+
+```
+docker run --network=host \
+ -v $PWD/database:/var/lib/biboumi \
+ -e BIBOUMI_PASSWORD=P4SSW0RD \
+ -e BIBOUMI_HOSTNAME=irc.example.com \
+ -e BIBOUMI_ADMIN=blabla \
+ -e BIBOUMI_XMPP_SERVER_IP=127.0.0.1 \
+ biboumi
+```
+
Variables
---------
@@ 31,6 44,7 @@ the container is started, using the following environment variables:
* BIBOUMI_HOSTNAME: Sets the value of the *hostname* option.
* BIBOUMI_SECRET: Sets the value of the *password* option.
* BIBOUMI_ADMIN: Sets the value of the *admin* option.
+* BIBOUMI_XMPP_SERVER_IP: Sets the value of the *xmpp_server_ip* option. The default is **xmpp**.
All these variables are optional, but biboumi will probably fail to start if
the hostname and secret are missing.
@@ 47,9 61,14 @@ docker run --link prosody:xmpp \
Linking with the XMPP server
----------------------------
-You can use the --link option to connect to any server, but it needs to be
-called *xmpp*. For example, if you are using a container named ejabberd, you
-would use the option *--link ejabberd:xmpp*.
+You can use the --link option to connect to any server running in a docker
+container, but it needs to be called *xmpp*, or the custom value set for the
+**BIBOUMI_XMPP_SERVER_IP** option. For example, if you are using a container
+named ejabberd, you would use the option *--link ejabberd:xmpp*.
+
+If you want to connect to the XMPP server running on the host machine, use
+the **--network=host** option.
+
Volumes
-------
M docker/biboumi/biboumi.cfg => docker/biboumi/biboumi.cfg +1 -1
@@ 1,4 1,4 @@
-xmpp_server_ip=xmpp
+xmpp_server_ip=BIBOUMI_XMPP_SERVER_IP
port=5347
db_name=/var/lib/biboumi/biboumi.sqlite
hostname=BIBOUMI_HOSTNAME
M docker/biboumi/entrypoint.sh => docker/biboumi/entrypoint.sh +1 -0
@@ 1,5 1,6 @@
#!/bin/bash
+sed -i s/BIBOUMI_XMPP_SERVER_IP/${BIBOUMI_XMPP_SERVER_IP:-xmpp}/ /etc/biboumi/biboumi.cfg
sed -i s/BIBOUMI_HOSTNAME/${BIBOUMI_HOSTNAME:-biboumi.localhost}/ /etc/biboumi/biboumi.cfg
sed -i s/BIBOUMI_ADMIN/${BIBOUMI_ADMIN:-}/ /etc/biboumi/biboumi.cfg
sed -i s/BIBOUMI_SECRET/${BIBOUMI_SECRET:-missing_secret}/ /etc/biboumi/biboumi.cfg