|
@@ -9,8 +9,7 @@ This setup packs all necessary configurations to run an [ejabberd](https://docs.
|
|
|
## Prerequisites
|
|
|
It is assumed that on the docker host we're already running
|
|
|
1. a [jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy) reverse proxy
|
|
|
-2. together with [jrcs/letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion) to obtain letsencrypt TLS certificates,
|
|
|
-3. as well as [watchtower](https://github.com/v2tec/watchtower) to keep images up-to-date.
|
|
|
+2. together with [nginx-proxy/acme-companion](https://github.com/nginx-proxy/acme-companion) to obtain letsencrypt TLS certificates
|
|
|
|
|
|
## Design decisions:
|
|
|
1. One host per instance / no vhosts
|
|
@@ -52,19 +51,34 @@ but also any other HTTP-only environment such as behind restrictive firewalls.*
|
|
|
|
|
|
## Used volumes
|
|
|
ejabber runs under user `ejabberd` with uid/guid `9000`. All data is stored in `/home/ejabberd/` within the container.
|
|
|
- - `.data/backup/` — place to to store DB dumps
|
|
|
+ - `./data/backup/` — place to to store DB dumps
|
|
|
- `./data/biboumi/database/` — sqlite DB for Biboumi. The Biboumi configuration is defined via environment variables in `docker-compose.yml`.
|
|
|
- `./data/conf/ejabberd.yml` — configuration file referring to conf.d
|
|
|
- `./data/conf.d/` — actual configuration files
|
|
|
- `./data/conf.custom/` — acaddtional custom configuration files
|
|
|
- - `.data/database/` — Erlang DB used to store all application data
|
|
|
- - `.data/uploads/` — files transferred between users
|
|
|
- - `.data/www/` — static web content
|
|
|
+ - `./data/database/` — Erlang DB used to store all application data
|
|
|
+ - `./data/uploads/` — files transferred between users
|
|
|
+ - `./data/www/` — static web content
|
|
|
- `/opt/docker/reverse-proxy/data/certs/${HOSTNAME}` — certificates and key material
|
|
|
|
|
|
## Installation & Configuration
|
|
|
|
|
|
-1. Clone the repo and the [reverse proxy and Let's Encrypt companion)](https://git.in-ulm.de/ulpeters/reverse-proxy) to /opt/docker.
|
|
|
+1. Clone the repo and the [reverse proxy and Let's Encrypt companion)](https://git.in-ulm.de/ulpeters/reverse-proxy) to /opt/docker and prepare data folders with proper permissions.
|
|
|
+ ```
|
|
|
+ inst_dir=/opt/docker/ejabberd
|
|
|
+ mkdir -p $inst_dir/data/database \
|
|
|
+ $inst_dir/data/backup \
|
|
|
+ $inst_dir/data/upload \
|
|
|
+ $inst_dir/data/www \
|
|
|
+ && chown -R 9000:9000 $inst_dir/data/
|
|
|
+
|
|
|
+ mkdir -p $inst_dir/data/biboumi/database
|
|
|
+ chown -R 1000:1000 $inst_dir/data/biboumi/
|
|
|
+ ```
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
2. Copy `.env.template` to `.env` and setup your hostname and ip. A fixed ip is necessary to stun/turn to work.
|
|
|
|