first commit
This commit is contained in:
commit
f248a5b7b2
9 changed files with 277 additions and 0 deletions
48
Dockerfile
Normal file
48
Dockerfile
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
################################################################################
|
||||
# Build a dockerfile for Prosody XMPP server для porno4free.ru
|
||||
################################################################################
|
||||
|
||||
FROM debian:12
|
||||
|
||||
MAINTAINER Prosody Developers and q00
|
||||
|
||||
|
||||
RUN rm /etc/apt/sources.list.d/*
|
||||
ADD sources.list /etc/apt
|
||||
# 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-zlib \
|
||||
lua5.3 \
|
||||
openssl \
|
||||
ca-certificates \
|
||||
ssl-cert \
|
||||
wget \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install and configure prosody
|
||||
RUN wget https://prosody.im/files/prosody.sources -O /etc/apt/sources.list.d/prosody.sources \
|
||||
&& apt update \
|
||||
&& apt install -y prosody prosody-modules
|
||||
|
||||
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"]
|
||||
2
README.md
Normal file
2
README.md
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Dockerfile для сборки prosody в docker контейнер.
|
||||
## Внимания sources.list надо самому редачить. Там локальная репа.
|
||||
28
build-docker.sh
Executable file
28
build-docker.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Usage: ./build-docker.sh def_file_name version_number"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$2" ]]; then
|
||||
echo "Usage: ./build-docker.sh def_file_name version_number"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Starting build..."
|
||||
cp "$1" ./prosody.deb
|
||||
docker build -t prosody/prosody:"$2" .
|
||||
for i in "${@:3}"; do
|
||||
echo "Also building tag $i"
|
||||
docker build -t prosody/prosody:"$i" .
|
||||
done
|
||||
docker push prosody/prosody
|
||||
|
||||
echo "Cleaning up..."
|
||||
docker rmi prosody/prosody:"$2"
|
||||
for i in "${@:3}"; do
|
||||
echo "Also cleaning tag $i"
|
||||
docker rmi prosody/prosody:"$i"
|
||||
done
|
||||
rm ./prosody.deb
|
||||
0
docker-compose.yaml
Normal file
0
docker-compose.yaml
Normal file
21
entrypoint.sh
Executable file
21
entrypoint.sh
Executable file
|
|
@ -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 "$@"
|
||||
47
prosody.sources
Normal file
47
prosody.sources
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
Suites: bookworm
|
||||
Types: deb
|
||||
Architectures: amd64 i386 armhf arm64
|
||||
Components: main
|
||||
Uris: http://packages.prosody.im/debian
|
||||
Signed-By:
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.11 (GNU/Linux)
|
||||
|
||||
mQGiBEoXOjERBAD2ygmSdiqsRmrTqUqcGoWmTU90DrikaYb3/rwwMhSloXT9qNuD
|
||||
aOdJb/LNfwhiSbKF35JHgYV4+RIdwDLv4wNqmsQH1ZYOUi3j/1O5w2LV8lG816X2
|
||||
NdGni+fGArtM68C9ZxdIDweo2V5G5StHINcKP/Cab08sUjyrrCpwO/Z5xwCg9H8L
|
||||
PsFYns6RcnM7f6A6x5NHEVsEAL9RYChhkecv/+qnbDlKHOJT8TQT4S8p6RYtaZHE
|
||||
XR73vvvj0P/6Lxw+tKZJqQmVpNaLXztLSNW3KfAR+Jz4SLBJoSP4uXJ5UVIUnqbp
|
||||
HCUZ3BnDGeHuTplxtrYWmznE34KMks6riXoUApU/kmo8TFqh8aTEp1F/Zd9TdriQ
|
||||
c0iCA/42SBlM3Ax0cbi2thHSEhUV6aCbs9R9H2Tmke0LswpUMTfxUT37b8t5ocbZ
|
||||
iHoGdEVIC3ZK2Usu6IS5uhY4245iECafLUX4LF4uY17IHj713yOHZ8T9t2LAGFu9
|
||||
oxM7EEoDyVK8Jg0fRn7srBC/p7MdBD1kwVaQOnIjqjiqf3e9sLQyUHJvc29keSBJ
|
||||
TSBEZWJpYW4gUGFja2FnZXMgPGRldmVsb3BlcnNAcHJvc29keS5pbT6IYAQTEQIA
|
||||
IAUCShc6MQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHOT1+Z02du11MQA
|
||||
nRsq54C4D1k/s0i0Tg41h1LDbAFtAKC2g53DYE3X8jPVJVBTFeHsnkztfLkEDQRK
|
||||
FzsAEBAAwd9OI2tmqS0DR3Z8vxpio0eV/0+G4OObYEzjq4Keohw8u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dzZ1NOKFCigz8luOHZeSXCS34THhi4fHZBzSKfD
|
||||
FJXOmq79ouHTY0hyvVksk/tj3g7Oz3obFYDbb86XmAVlPvsmWTFO83DFS2ohA6ai
|
||||
lvbRhTMOED4y5Ed5abFcfrziCTyPtZgm1OpeNibrOp85D2IzMHlqZTG/RWl5LtVU
|
||||
wFSrv0OlEz2xD9RyrlIg9c4BUJNybErX1oZ08FVWQdmgff59XNNLv7bPPHYKCnaE
|
||||
ou6SAY1PeEgmbONRJ6cR6dSVIMEAl8rFCIcL7jz/6S4CjMqST4D9MqDOeoDdl2Zm
|
||||
ohKViNdLF+P2Oha6djBTxEjz1qhfcu7OVjGaiEkEGBECAAkFAkoXOwACGwwACgkQ
|
||||
c5PX5nTZ27WmTQCg32XtVZ1E9KIPDpcpMrhV+4wpt50AnjSYtDgDGoWbRxhGDNK3
|
||||
UqwePNWL
|
||||
=/y9s
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
BIN
prosody/.prosody.cfg.lua.kate-swp
Normal file
BIN
prosody/.prosody.cfg.lua.kate-swp
Normal file
Binary file not shown.
123
prosody/prosody.cfg.lua
Executable file
123
prosody/prosody.cfg.lua
Executable file
|
|
@ -0,0 +1,123 @@
|
|||
admins = { "q@porno4free.ru" }
|
||||
plugin_paths = {"/etc/prosody/prosody-modules"}
|
||||
daemonize = false
|
||||
|
||||
modules_enabled = {
|
||||
|
||||
-- Generally required
|
||||
"disco"; -- Service discovery
|
||||
"roster"; -- Allow users to have a roster. Recommended ;)
|
||||
"saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
|
||||
"tls"; -- Add support for secure TLS on c2s/s2s connections
|
||||
|
||||
-- Not essential, but recommended
|
||||
"blocklist"; -- Allow users to block communications with other users
|
||||
"bookmarks"; -- Synchronise the list of open rooms between clients
|
||||
"carbons"; -- Keep multiple online clients in sync
|
||||
"dialback"; -- Support for verifying remote servers using DNS
|
||||
"limits"; -- Enable bandwidth limiting for XMPP connections
|
||||
"pep"; -- Allow users to store public and private data in their account
|
||||
"private"; -- Legacy account storage mechanism (XEP-0049)
|
||||
"smacks"; -- Stream management and resumption (XEP-0198) "vcard4"; -- User profiles (stored in PEP)
|
||||
"vcard_legacy"; -- Conversion between legacy vCard and PEP Avatar, vcard
|
||||
|
||||
-- Nice to have
|
||||
"csi_simple"; -- Simple but effective traffic optimizations for mobile devices
|
||||
"invites"; -- Create and manage invites
|
||||
"invites_adhoc"; -- Allow admins/users to create invitations via their client
|
||||
"invites_register"; -- Allows invited users to create accounts
|
||||
"ping"; -- Replies to XMPP pings with pongs
|
||||
"register"; -- Allow users to register on this server using a client and change passwords
|
||||
"time"; -- Let others know the time here on this server
|
||||
"uptime"; -- Report how long server has been running
|
||||
"version"; -- Replies to server version requests
|
||||
"mam"; -- Store recent messages to allow multi-device synchronization
|
||||
"turn_external"; -- Provide external STUN/TURN service for e.g. audio/video calls
|
||||
-- Admin interfaces
|
||||
"admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
|
||||
"admin_shell"; -- Allow secure administration via 'prosodyctl shell'
|
||||
"admin_telnet";
|
||||
-- HTTP modules
|
||||
--"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
|
||||
"http_openmetrics"; -- for exposing metrics to stats collectors
|
||||
--"websocket"; -- XMPP over WebSockets
|
||||
"unknown"
|
||||
|
||||
-- Other specific functionality
|
||||
--"announce"; -- Send announcement to all online users
|
||||
-- "groups"; -- Shared roster support
|
||||
--"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
|
||||
--"mimicking"; -- Prevent address spoofing
|
||||
--"motd"; -- Send a message to users when they log in
|
||||
--"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
|
||||
--"s2s_bidi"; -- Bi-directional server-to-server (XEP-0288)
|
||||
--"server_contact_info"; -- Publish contact information for this service
|
||||
--"tombstones"; -- Prevent registration of deleted accounts
|
||||
--"watchregistrations"; -- Alert admins of registrations
|
||||
--"welcome"; -- Welcome users who register accounts
|
||||
}
|
||||
|
||||
modules_disabled = {
|
||||
-- "offline"; -- Store offline messages
|
||||
-- "c2s"; -- Handle client connections
|
||||
-- "s2s"; -- Handle server-to-server connections
|
||||
-- "posix"; -- POSIX functionality, sends server to background, etc.
|
||||
}
|
||||
-- Auth --
|
||||
allow_unencrypted_plain_auth = true
|
||||
c2s_require_encryption = false
|
||||
s2s_secure_auth = true
|
||||
allow_registration = false
|
||||
registration_invite_only = false
|
||||
authentication = "internal_hashed"
|
||||
cyrus_service_name = "xmpp"
|
||||
|
||||
limits = {
|
||||
c2s = {
|
||||
rate = "1000kb/s";
|
||||
};
|
||||
s2sin = {
|
||||
rate = "3000kb/s";
|
||||
};
|
||||
}
|
||||
|
||||
pidfile = "/run/prosody/prosody.pid"
|
||||
|
||||
-- Arhive Message --
|
||||
--storage = "sql" -- Default is "internal"
|
||||
--sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "okArkhipsql)(%", host = "localhost" }
|
||||
|
||||
archive_expires_after = "never"
|
||||
|
||||
-- TURN --
|
||||
turn_external_host = "bebrik.xyz"
|
||||
turn_external_secret = "jasdkfladkjfadsklfagj12"
|
||||
|
||||
-- For advanced logging see https://prosody.im/doc/logging
|
||||
log = {
|
||||
info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
|
||||
error = "/var/log/prosody/prosody.err";
|
||||
debug = "/var/log/prosody/prosody_debug.log";
|
||||
}
|
||||
certificates = "certs"
|
||||
|
||||
----------- Virtual hosts -----------
|
||||
VirtualHost "porno4free.ru"
|
||||
ssl = {
|
||||
key = "/etc/prosody/ssl/porno4free.ru.key";
|
||||
certificate = "/etc/prosody/ssl/porno4free.ru.fullchain.pem";
|
||||
}
|
||||
|
||||
------ Components ------
|
||||
Component "chat.porno4free.ru" "muc"
|
||||
modules_enabled = { "muc_mam" }
|
||||
restrict_room_creation = "local"
|
||||
muc_room_default_language = "ru"
|
||||
muc_room_default_history_length = 228
|
||||
|
||||
Component "proxy.porno4free.ru" "proxy65"
|
||||
|
||||
Component "uploads.porno4free.ru" "http_upload_external"
|
||||
http_upload_external_base_url = "https://uploads.porno4free.ru/"
|
||||
http_upload_external_secret = "bebra228"
|
||||
http_upload_external_file_size_limit = 2147483648
|
||||
8
sources.list
Normal file
8
sources.list
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
deb http://192.168.1.2:8081/repository/debian-mirror bookworm main
|
||||
deb-src http://192.168.1.2:8081/repository/debian-mirror bookworm main
|
||||
deb http://192.168.1.2:8081/repository/debian-mirror-security bookworm-security main
|
||||
deb-src http://192.168.1.2:8081/repository/debian-mirror-security bookworm-security main
|
||||
deb http://192.168.1.2:8081/repository/debian-mirror bookworm-backports main
|
||||
deb-src http://192.168.1.2:8081/repository/debian-mirror bookworm-backports main
|
||||
|
||||
|
||||
Loading…
Reference in a new issue