docker: Add the XMPP_SERVER_IP option, and document the --network=host usage
This commit is contained in:
@@ -5,7 +5,7 @@ Running
|
|||||||
-------
|
-------
|
||||||
|
|
||||||
This image does not embed any XMPP server. You need to have a running XMPP
|
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
|
Assuming you have a running `prosody
|
||||||
<https://hub.docker.com/r/prosody/prosody/>`_ container already running and
|
<https://hub.docker.com/r/prosody/prosody/>`_ container already running and
|
||||||
@@ -22,6 +22,19 @@ docker run --link prosody:xmpp \
|
|||||||
biboumi
|
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
|
Variables
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@@ -31,6 +44,7 @@ the container is started, using the following environment variables:
|
|||||||
* BIBOUMI_HOSTNAME: Sets the value of the *hostname* option.
|
* BIBOUMI_HOSTNAME: Sets the value of the *hostname* option.
|
||||||
* BIBOUMI_SECRET: Sets the value of the *password* option.
|
* BIBOUMI_SECRET: Sets the value of the *password* option.
|
||||||
* BIBOUMI_ADMIN: Sets the value of the *admin* 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
|
All these variables are optional, but biboumi will probably fail to start if
|
||||||
the hostname and secret are missing.
|
the hostname and secret are missing.
|
||||||
@@ -47,9 +61,14 @@ docker run --link prosody:xmpp \
|
|||||||
Linking with the XMPP server
|
Linking with the XMPP server
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
You can use the --link option to connect to any server, but it needs to be
|
You can use the --link option to connect to any server running in a docker
|
||||||
called *xmpp*. For example, if you are using a container named ejabberd, you
|
container, but it needs to be called *xmpp*, or the custom value set for the
|
||||||
would use the option *--link ejabberd:xmpp*.
|
**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
|
Volumes
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
xmpp_server_ip=xmpp
|
xmpp_server_ip=BIBOUMI_XMPP_SERVER_IP
|
||||||
port=5347
|
port=5347
|
||||||
db_name=/var/lib/biboumi/biboumi.sqlite
|
db_name=/var/lib/biboumi/biboumi.sqlite
|
||||||
hostname=BIBOUMI_HOSTNAME
|
hostname=BIBOUMI_HOSTNAME
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/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_HOSTNAME/${BIBOUMI_HOSTNAME:-biboumi.localhost}/ /etc/biboumi/biboumi.cfg
|
||||||
sed -i s/BIBOUMI_ADMIN/${BIBOUMI_ADMIN:-}/ /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
|
sed -i s/BIBOUMI_SECRET/${BIBOUMI_SECRET:-missing_secret}/ /etc/biboumi/biboumi.cfg
|
||||||
|
|||||||
Reference in New Issue
Block a user