initial commit

This commit is contained in:
q 2024-11-17 15:54:35 -05:00
commit 4ef765d722
6 changed files with 370 additions and 0 deletions

16
build/Dockerfile Normal file
View file

@ -0,0 +1,16 @@
from alpine:edge
env prosody_version 0.12.4-r2
run apk add --no-cache bash ca-certificates "prosody=${prosody_version}" lua-dbi lua-unbound lua-bitop luarocks lua-ossl
run mkdir -p /etc/prosody/conf.d /usr/local/lib/prosody/modules
copy docker-entrypoint.sh /
entrypoint ["/docker-entrypoint.sh"]
expose 80 443 5222 5269 5347 5280 5281 5223 5270
volume ["/etc/prosody/", "/etc/prosody/conf.d/", "/usr/local/lib/prosody/modules/", "/var/lib/prosody/", "/var/run/prosody/prosody.pid"]
user prosody
env __flush_log yes
cmd ["prosody"]

14
build/docker-entrypoint.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
set -e
if [[ "$1" != "prosody" ]]; then
exec prosodyctl $*
exit 0;
fi
if [ "$LOCAL" -a "$PASSWORD" -a "$DOMAIN" ] ; then
echo "Creating user ${LOCAL}@${DOMAIN}"
prosodyctl register $LOCAL $DOMAIN $PASSWORD
fi
exec "$@"