Archived
1
0
Fork 0

prosody: Fix Readme

This commit is contained in:
Joerg Elfring 2018-11-22 20:01:37 +01:00
parent 16b6bea9bf
commit 9764c3027b

View file

@ -1,4 +1,5 @@
# Prosody Docker image ## Prosody Docker image
Source: https://bitbucket.org/elfrinjo/dockerfiles/src/master/prosody-0.11/
Create an image for running prosody XMPP server version 0.11 Create an image for running prosody XMPP server version 0.11
http://prosody.im/ on Alpine Linux. http://prosody.im/ on Alpine Linux.
@ -8,20 +9,26 @@ HINT: This is not an official image. Builds might not happen regularly.
You will need to configure a vhost inside the config volume (prosody.cfg.lua). You will need to configure a vhost inside the config volume (prosody.cfg.lua).
The certificate generation with prosodyctl does not work. The certificate generation with prosodyctl does not work.
However, certificates can be put into the config volume or be linked in from an However, certificates can be put into the config volume.
other volume (like letsencrypt). I suggest acme.sh for communication with I suggest acme.sh for communication with Letsencrypt.
Letsencrypt. https://github.com/Neilpang/acme.sh/wiki/Run-acme.sh-in-docker https://github.com/Neilpang/acme.sh/wiki/Run-acme.sh-in-docker
You need to configure the certificates location inside prosodys config. You need to configure the certificates location inside prosodys config.
IPORTANT: You really should add TLS. IPORTANT: You really should add TLS.
## Usage ## Upgrading from 0.10
The module configuration has to be updated:
- Replace mod_omemo_all_access with mod_profile
- Replace mod_mam_muc with mod_muc_mam
- Disable mod_omemo_all_access
Start the container with volumes for config, database and maybe additional ## Usage
certificates. Start the container with volumes for config and database.
Do not forget to customize your configuration! Do not forget to customize your configuration!
.
.
```console ```console
$ docker run -d \ # docker run -d \
-p 5000:5000 \ -p 5000:5000 \
-p 5222:5222 \ -p 5222:5222 \
-p 5269:5269 \ -p 5269:5269 \
@ -32,19 +39,21 @@ $ docker run -d \
-v /etc/localtime:/etc/localtime:ro \ -v /etc/localtime:/etc/localtime:ro \
-v prosody-cfg:/usr/local/etc/prosody:ro \ -v prosody-cfg:/usr/local/etc/prosody:ro \
-v prosody-data:/usr/local/var/lib/prosody \ -v prosody-data:/usr/local/var/lib/prosody \
elfrinjo/prosody elfrinjo/prosody-0.11
``` ```
.
.
To create the first user, exec into the running container and use prosodyctl. To create the first user, exec into the running container and use prosodyctl.
```console ```console
$ docker exec -ti prosody bash # docker exec -ti prosody bash
/ $ prosodyctl adduser JID #/$ prosodyctl adduser JID
``` ```
.
.
To Create a certificate for you host: To Create a certificate for you host:
```console ```console
$ docker pull neilpang/acme.sh # docker pull neilpang/acme.sh
$ docker run --rm -it \ # docker run --rm -it \
--volume prosody-acme:/acme.sh \ --volume prosody-acme:/acme.sh \
--net=host \ --net=host \
neilpang/acme.sh --issue \ neilpang/acme.sh --issue \
@ -52,19 +61,21 @@ $ docker run --rm -it \
-d conference.example.com \ -d conference.example.com \
--standalone --standalone
``` ```
.
.
To renew the certificate: To renew the certificate:
```console ```console
$ docker pull neilpang/acme.sh # docker pull neilpang/acme.sh
$ docker run --rm -it \ # docker run --rm -it \
--volume prosody-acme:/acme.sh \ --volume prosody-acme:/acme.sh \
--net=host \ --net=host \
neilpang/acme.sh --cron --standalone neilpang/acme.sh --cron --standalone
$ docker run --rm \ # docker run --rm \
-v prosody-acme:/acme.sh \ -v prosody-acme:/acme.sh \
-v prosody-cfg:/target \ -v prosody-cfg:/target \
neilpang/acme.sh --install-cert \ neilpang/acme.sh --install-cert \
-d example.com \ -d example.com \
--key-file /target/certs/example.com/example.com.key \ --key-file /target/certs/example.com/example.com.key \
--fullchain-file /target/certs/example.com/fullchain.cer --fullchain-file /target/certs/example.com/fullchain.cer
# docker restart prosody
``` ```