Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
218b1be0dd | ||
|
|
29bfdd417c | ||
|
|
4236bd38e4 | ||
|
|
5a5c5021a3 | ||
|
|
857ddc48b9 | ||
|
|
9673cd78a3 | ||
|
|
93f32ec3be | ||
|
|
eddb4b3531 | ||
|
|
bb7596ffdd | ||
|
|
034a12c0fd | ||
|
|
36751f5229 | ||
|
|
e207af3ca6 | ||
|
|
6feff1c7e6 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,4 @@
|
|||||||
.env
|
.env
|
||||||
data/prosody/certs
|
data/prosody/certs
|
||||||
|
web-sites
|
||||||
|
logs
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ FROM debian:bookworm-slim
|
|||||||
RUN apt-get update --fix-missing && \
|
RUN apt-get update --fix-missing && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
prosody \
|
prosody \
|
||||||
|
prosody-modules \
|
||||||
lua-dbi-mysql \
|
lua-dbi-mysql \
|
||||||
lua-sec \
|
lua-sec \
|
||||||
lua-unbound \
|
lua-unbound \
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
admins = { "admin@guschin.info", "admin@xmpp.guschin.info" }
|
admins = { "admin@guschin.info", "admin@xmpp.guschin.info" }
|
||||||
|
|
||||||
|
plugin_paths = { "/usr/lib/prosody/modules" }
|
||||||
|
|
||||||
modules_enabled = {
|
modules_enabled = {
|
||||||
-- Generally required
|
-- Generally required
|
||||||
"roster";
|
"roster";
|
||||||
@@ -25,6 +27,10 @@ modules_enabled = {
|
|||||||
|
|
||||||
-- Admin interface
|
-- Admin interface
|
||||||
"admin_adhoc";
|
"admin_adhoc";
|
||||||
|
|
||||||
|
-- Gateway support
|
||||||
|
"privilege";
|
||||||
|
"http_file_share";
|
||||||
};
|
};
|
||||||
|
|
||||||
modules_disabled = {
|
modules_disabled = {
|
||||||
@@ -53,6 +59,7 @@ sql = {
|
|||||||
c2s_ports = { 5222 }
|
c2s_ports = { 5222 }
|
||||||
s2s_ports = { 5269 }
|
s2s_ports = { 5269 }
|
||||||
component_ports = { 5347 }
|
component_ports = { 5347 }
|
||||||
|
component_interface = "0.0.0.0"
|
||||||
http_ports = { 5280 }
|
http_ports = { 5280 }
|
||||||
https_ports = { 5281 }
|
https_ports = { 5281 }
|
||||||
|
|
||||||
@@ -75,15 +82,46 @@ VirtualHost "guschin.info"
|
|||||||
key = "/etc/prosody/certs/guschin.info.key";
|
key = "/etc/prosody/certs/guschin.info.key";
|
||||||
certificate = "/etc/prosody/certs/guschin.info.crt";
|
certificate = "/etc/prosody/certs/guschin.info.crt";
|
||||||
}
|
}
|
||||||
|
privileged_entities = {
|
||||||
|
["telegram.guschin.info"] = {
|
||||||
|
roster = "both"; -- auto add/remove Telegram contacts from roster
|
||||||
|
message = "outgoing"; -- reflect messages sent via official Telegram apps
|
||||||
|
iq = {
|
||||||
|
["http://jabber.org/protocol/pubsub"] = "both"; -- PEP bookmarks
|
||||||
|
["http://jabber.org/protocol/pubsub#owner"] = "set"; -- message display sync
|
||||||
|
["urn:xmpp:http:upload:0"] = "get"; -- upload on behalf of users
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
-- Secondary virtual host (user@xmpp.guschin.info)
|
-- Secondary virtual host (user@xmpp.guschin.info)
|
||||||
VirtualHost "xmpp.guschin.info"
|
VirtualHost "xmpp.guschin.info"
|
||||||
ssl = {
|
ssl = {
|
||||||
key = "/etc/prosody/certs/xmpp.guschin.info.key";
|
key = "/etc/prosody/certs/guschin.info.key";
|
||||||
certificate = "/etc/prosody/certs/xmpp.guschin.info.crt";
|
certificate = "/etc/prosody/certs/guschin.info.crt";
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Component for MUC (Multi-User Chat)
|
-- Component for MUC (Multi-User Chat)
|
||||||
Component "muc.guschin.info" "muc"
|
Component "muc.guschin.info" "muc"
|
||||||
modules_enabled = { "muc_mam" }
|
modules_enabled = { "muc_mam" }
|
||||||
storage = "sql"
|
storage = "sql"
|
||||||
|
ssl = {
|
||||||
|
key = "/etc/prosody/certs/guschin.info.key";
|
||||||
|
certificate = "/etc/prosody/certs/guschin.info.crt";
|
||||||
|
}
|
||||||
|
|
||||||
|
-- HTTP file upload (XEP-0363) — used by slidgram for Telegram→XMPP attachments
|
||||||
|
Component "upload.guschin.info" "http_file_share"
|
||||||
|
http_file_share_access = { "telegram.guschin.info", "guschin.info", "xmpp.guschin.info" }
|
||||||
|
ssl = {
|
||||||
|
key = "/etc/prosody/certs/guschin.info.key";
|
||||||
|
certificate = "/etc/prosody/certs/guschin.info.crt";
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Telegram gateway (slidgram)
|
||||||
|
Component "telegram.guschin.info"
|
||||||
|
component_secret = os.getenv("SLIDGRAM_COMPONENT_SECRET")
|
||||||
|
ssl = {
|
||||||
|
key = "/etc/prosody/certs/guschin.info.key";
|
||||||
|
certificate = "/etc/prosody/certs/guschin.info.crt";
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,13 +12,14 @@ services:
|
|||||||
MYSQL_USER: ${MYSQL_USER}
|
MYSQL_USER: ${MYSQL_USER}
|
||||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||||
|
SLIDGRAM_COMPONENT_SECRET: ${SLIDGRAM_COMPONENT_SECRET}
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:172.17.0.1"
|
- "host.docker.internal:172.17.0.1"
|
||||||
ports:
|
ports:
|
||||||
- "5222:5222"
|
- "5222:5222"
|
||||||
- "5269:5269"
|
- "5269:5269"
|
||||||
- "5347:5347"
|
|
||||||
- "5280:5280"
|
- "5280:5280"
|
||||||
|
- "5281:5281"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/prosody:/var/lib/prosody
|
- ./data/prosody:/var/lib/prosody
|
||||||
- ./logs/prosody:/var/log/prosody
|
- ./logs/prosody:/var/log/prosody
|
||||||
@@ -38,6 +39,25 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- prosody
|
- prosody
|
||||||
|
|
||||||
|
slidgram:
|
||||||
|
image: codeberg.org/slidge/slidgram:latest
|
||||||
|
container_name: slidgram
|
||||||
|
user: "100:102"
|
||||||
|
environment:
|
||||||
|
SLIDGE_JID: telegram.guschin.info
|
||||||
|
SLIDGE_SECRET: ${SLIDGRAM_COMPONENT_SECRET}
|
||||||
|
SLIDGE_SERVER: prosody-xmpp
|
||||||
|
SLIDGE_PORT: 5347
|
||||||
|
SLIDGE_UPLOAD_SERVICE: upload.guschin.info
|
||||||
|
volumes:
|
||||||
|
- ./data/slidgram:/var/lib/slidge
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
prosody:
|
||||||
|
condition: service_healthy
|
||||||
|
networks:
|
||||||
|
- prosody
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
prosody:
|
prosody:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
Reference in New Issue
Block a user