diff --git a/Dockerfile b/Dockerfile index e885cb2..eb14d2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,6 +49,6 @@ RUN chmod 755 /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] EXPOSE 80 443 5222 5269 5347 5280 5281 -USER prosody + ENV __FLUSH_LOG yes CMD ["prosody"] diff --git a/entrypoint.sh b/entrypoint.sh index 8a6243e..f92de93 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,13 @@ #!/bin/bash set -e +: ${PROSODY_USERID:=101} + +if [ "$PROSODY_USERID" != "101" ]; then + usermod -u "$PROSODY_USERID" prosody; + groupmod -g "$PROSODY_USERID" prosody; +fi + if [[ "$1" != "prosody" ]]; then exec prosodyctl $* exit 0;