项目作者: joschi

项目描述 :
Prosody Docker image based on Alpine Linux
高级语言: Lua
项目地址: git://github.com/joschi/docker-prosody-alpine.git
创建时间: 2018-02-23T17:39:29Z
项目社区:https://github.com/joschi/docker-prosody-alpine

开源协议:MIT License

下载


Prosody

Docker Stars
Docker Pulls
Docker Image Version

What is Prosody?

Prosody is a modern XMPP communication server. It aims to be easy to set up and configure, and efficient with system resources.

Additionally, for developers it aims to be easy to extend and give a flexible system on which to rapidly develop added functionality, or prototype new protocols.

Example

  1. # docker run -d \
  2. --name prosody
  3. -p 5222:5222 \
  4. -p 5269:5269 \
  5. -e LOCAL=romeo \
  6. -e DOMAIN=shakespeare.lit \
  7. -e PASSWORD=juliet4ever \
  8. -v /data/prosody/vhosts:/etc/prosody/conf.d \
  9. -v /data/prosody/modules:/usr/local/lib/prosody/modules \
  10. joschi/prosody-alpine:0.10.0-1

Configuration

The default Prosody configuration file can be overwritten entirely (/etc/prosody/prosody.cfg.lua) or extended by adding configuration snippets into the /etc/prosody/conf.d/ directory.

Virtual hosts

New domains can be added by placing configuration snippets with the virtual host definitions to /etc/prosody/conf.d/.i

Minimal example:

  1. # cat vhosts/example-org.cfg.lua
  2. VirtualHost "example.org"
  3. enable = true
  4. # docker run -d \
  5. --name prosody
  6. -p 5222:5222 \
  7. -p 5269:5269 \
  8. -v /data/prosody/vhosts:/etc/prosody/conf.d \
  9. joschi/prosody-alpine:0.10.0-1

Creating a user

This Docker image supports creating a single user on startup by providing the following environment variables:

  • LOCAL: local part of the JID
  • DOMAIN: domain part of the JID
  • PASSWORD: plaintext password of the user

For example, the environment variables LOCAL=foobar, DOMAIN=example.com, PASSWORD=supersecret would create a user named “foobar@example.com” with the password “supersecret”.

Other than that, users can be created using prosodyctl in a running container:

  1. # docker exec -it prosody prosodyctl register foobar example.com supersecret

Prosody modules

Additional modules, e. g. from the Prosody Community Modules, can be added by putting the Lua files into the /usr/local/lib/prosody/modules/ directory.

Persistent data

Prosody only writes data into two locations, which have to be persisted in Docker volumes to survive a container restart:

  • /var/lib/prosody/: The Prosody data_path
  • /var/run/prosody/prosody.pid: The Prosody pidfile.

Acknowledgements

This Docker image is partly based on the official prosody/prosody Docker image.

License

This Docker image is licensed under the MIT license, see LICENSE.