5 Commits

Author SHA1 Message Date
Matthew Wild 6d139045cf Merge pull request #28 from prosody/27-entrypoint.sh
Make `entrypoint.sh` executable
2016-03-09 11:13:37 +00:00
Lloyd Watkin b31d7c913e Make entrypoint.sh executable
Fixes #27
cc @mwild1
2016-03-09 08:52:23 +00:00
Matthew Wild d346e0912e Install lua-bitop, fixes #24 2016-02-04 19:24:01 +00:00
Matthew Wild 8bbb02e228 entrypoint.sh: If a command is passed to the image, run prosodyctl instead 2016-02-04 19:19:17 +00:00
Matthew Wild bed0d8e598 Run as user 'prosody', and run prosody instead of prosodyctl. Also set __FLUSH_LOG environment variable to tell Prosody it needs to flush its logs after writing. Fixes #23 and fixes #25. 2016-02-04 19:17:11 +00:00
2 changed files with 10 additions and 1 deletions
+5 -1
View File
@@ -13,6 +13,7 @@ RUN apt-get update \
libidn11 \
liblua5.1-expat0 \
libssl1.0.0 \
lua-bitop \
lua-dbi-mysql \
lua-dbi-postgresql \
lua-dbi-sqlite3 \
@@ -33,7 +34,10 @@ RUN dpkg -i /tmp/prosody.deb \
&& perl -i -pe 'BEGIN{undef $/;} s/^log = {.*?^}$/log = {\n {levels = {min = "info"}, to = "console"};\n}/smg' /etc/prosody/prosody.cfg.lua
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 80 443 5222 5269 5347 5280 5281
CMD ["prosodyctl", "start"]
USER prosody
ENV __FLUSH_LOG yes
CMD ["prosody"]
+5
View File
@@ -1,6 +1,11 @@
#!/bin/bash
set -e
if [[ "$1" != "prosody" ]]; then
exec prosodyctl $*
exit 0;
fi
if [ "$LOCAL" -a "$PASSWORD" -a "$DOMAIN" ] ; then
prosodyctl register $LOCAL $DOMAIN $PASSWORD
fi