forked from fedimint/fedimint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a xmpp server to full tls docker-compose
- Loading branch information
Showing
5 changed files
with
261 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Based on https://github.com/prosody/prosody-docker | ||
|
||
FROM debian:12-slim | ||
|
||
# Install dependencies | ||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
lsb-base \ | ||
procps \ | ||
adduser \ | ||
lua-bitop \ | ||
lua-dbi-mysql \ | ||
lua-dbi-postgresql \ | ||
lua-dbi-sqlite3 \ | ||
lua-event \ | ||
lua-expat \ | ||
lua-filesystem \ | ||
lua-sec \ | ||
lua-socket \ | ||
lua-unbound \ | ||
lua-zlib \ | ||
lua5.1 \ | ||
lua5.2 \ | ||
openssl \ | ||
ca-certificates \ | ||
ssl-cert \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& wget https://prosody.im/files/prosody.sources -O /etc/apt/sources.list.d/prosody.sources \ | ||
&& apt update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y prosody | ||
|
||
RUN mkdir -p /var/run/prosody && chown prosody:prosody /var/run/prosody | ||
|
||
COPY ./entrypoint.sh /entrypoint.sh | ||
RUN chmod 755 /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
EXPOSE 80 443 5222 5269 5347 5280 5281 | ||
ENV __FLUSH_LOG yes | ||
CMD ["prosody", "-F"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash -e | ||
set -e | ||
|
||
data_dir_owner="$(stat -c %u "/var/lib/prosody/")" | ||
if [[ "$(id -u prosody)" != "$data_dir_owner" ]]; then | ||
usermod -u "$data_dir_owner" prosody | ||
fi | ||
if [[ "$(stat -c %u /var/run/prosody/)" != "$data_dir_owner" ]]; then | ||
chown "$data_dir_owner" /var/run/prosody/ | ||
fi | ||
|
||
if [[ "$1" != "prosody" ]]; then | ||
exec prosodyctl "$@" | ||
exit 0; | ||
fi | ||
|
||
if [[ "$LOCAL" && "$PASSWORD" && "$DOMAIN" ]]; then | ||
prosodyctl register "$LOCAL" "$DOMAIN" "$PASSWORD" | ||
fi | ||
|
||
exec setpriv --reuid=prosody --regid=prosody --init-groups "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters