6 Commits

Author SHA1 Message Date
Lloyd Watkin 12dcdb0c64 Document adding a default
Fixes #1
2014-11-25 15:10:21 +00:00
Lloyd Watkin 56160ac766 Ignore errors 2014-11-25 15:05:04 +00:00
Lloyd Watkin a99fbcc814 Add a start up script 2014-11-25 15:04:08 +00:00
Lloyd Watkin 712f293389 Use a bash script to start prosody 2014-11-25 14:54:40 +00:00
Lloyd Watkin eb205258f8 Add port 5281 2014-11-24 14:27:32 +00:00
Lloyd Watkin 6f17c6ed1e Add link to prosody in the registry 2014-11-17 09:34:26 +00:00
3 changed files with 27 additions and 2 deletions
+3 -1
View File
@@ -17,7 +17,9 @@ RUN apt-get install -y openssl lua5.1 lua-expat lua-socket lua-filesystem \
lua-dbi-sqlite3 libssl1.0.0 lua-sec lua-zlib liblua5.1-expat0
COPY ./prosody.deb /data/prosody.deb
COPY ./start.sh /data/start.sh
RUN chmod 700 /data/start.sh
RUN dpkg -i /data/prosody.deb
# If using default configuration keep a process alive
@@ -25,4 +27,4 @@ RUN echo 'daemonize = false;' | cat - /etc/prosody/prosody.cfg.lua > temp && mv
EXPOSE 443 80 5222 5269 5347 5280 5281
ENTRYPOINT prosodyctl start
ENTRYPOINT /data/start.sh
+13 -1
View File
@@ -1,6 +1,8 @@
# Prosody Docker
This is the Prosody Docker image building repository. Its only really designed to be used on the Prosody build server for pushing to the [Docker registry](https://registry.hub.docker.com/repos/prosody/).
This is the Prosody Docker image building repository. Its only really designed to be used on the Prosody build server for pushing to the [Docker registry](https://registry.hub.docker.com).
For images please see here: [Prosody on Docker](https://registry.hub.docker.com/u/prosody/prosody/).
It works by coping in a recently built `deb` file and running the install on the system.
@@ -12,6 +14,12 @@ Docker images are built off an __Ubuntu 14.04 LTS__ base.
docker run -d prosody/prosody --name prosody -p 5222:5222
```
On startup the image will create a default user of `admin@localhost` with password `password`. This can be changed by using environment variables `LOCAL`, `DOMAIN`, and `PASSWORD`. This performs the following action on startup:
prosodyctl register *local* *domain* *password*
Any error from this script is ignored. Prosody will not check the user exists before running the command (i.e. existing users will be overwritten). It is expected that [mod_admin_adhoc](http://prosody.im/doc/modules/mod_admin_adhoc) will then be in place for managing users (and the server).
### Ports
The image exposes the following ports to the docker host:
@@ -21,6 +29,7 @@ The image exposes the following ports to the docker host:
* __5269__: s2s port
* __5347__: XMPP component port
* __5280__: BOSH / websocket port
* __5281__: Secure BOSH / websocket port
Note: These default ports can be changed in your configuration file. Therefore if you change these ports will not be exposed.
@@ -45,6 +54,9 @@ docker run -d prosody/prosody:0.9 \
-p 5222:5222 \
-p 5269:5269 \
-p localhost:5347:5347 \
-e LOCAL=romeo \
-e DOMAIN=shakespeare.lit \
-e PASSWORD=juliet4ever \
-v /etc/prosody /data/prosody/configuration \
-v /var/log/prosody /logs/prosody \
-v /usr/lib/prosody-modules /data/prosody/modules
+11
View File
@@ -0,0 +1,11 @@
#! /bin/bash
if [ ! "${LOCAL}" ] || [ ! "${PASSWORD}" ] || [ ! "${DOMAIN}" ] ; then
LOCAL="admin"
PASSWORD="password"
DOMAIN="localhost"
fi
prosodyctl register $LOCAL $DOMAIN $PASSWORD || true
prosodyctl start