Skip to content

Commit

Permalink
Revert "Use tini as PID 1 inside the container"
Browse files Browse the repository at this point in the history
This reverts commit 31d6d84.

While tini successfully forwards signals, this leads to `runuser`
killing prosody now. The container does terminate in 10 seconds, so
Docker is happy and you could argue that actually fixes #68, but it's no
graceful shutdown. The revert is done because it's easier to apply a
real fix without tini.
  • Loading branch information
LeSpocky authored and Zash committed Mar 27, 2021
1 parent 52cd642 commit 83556a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ RUN apt-get update \
openssl \
ca-certificates \
ssl-cert \
tini \
&& rm -rf /var/lib/apt/lists/*

# Install and configure prosody
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ if [[ "$(stat -c %u /var/run/prosody/)" != "$data_dir_owner" ]]; then
fi

if [[ "$1" != "prosody" ]]; then
exec tini -- prosodyctl "$@"
exec prosodyctl "$@"
exit 0;
fi

if [[ "$LOCAL" && "$PASSWORD" && "$DOMAIN" ]]; then
prosodyctl register "$LOCAL" "$DOMAIN" "$PASSWORD"
fi

exec tini -- runuser -u prosody -- "$@"
exec runuser -u prosody -- "$@"

0 comments on commit 83556a4

Please sign in to comment.