Add xmpp server to docker compose

parent 1d4e77cd
version: '3.4'
services:
xmpp-server:
build: ./prosody
ports:
- "5222:5222"
expose:
- "5347"
volumes:
- ./prosody/localhost.cfg.lua:/etc/prosody/conf.d/localhost.cfg.lua:Z
- ./prosody/data:/var/lib/prosody:Z
prekeys-raw:
build: ./raw
command: -address 0.0.0.0 -port 30123 -identity ${PREKEY_SERVER_IDENTITY} -key-file /secrets/server.keys -storage dir:/keys
command: -address 0.0.0.0 -port 30123 -identity "${PREKEY_SERVER_IDENTITY}" -key-file /secrets/server.keys -storage dir:/keys
volumes:
- type: bind
source: ./secrets
target: /secrets
- type: bind
source: ./keys
target: /keys
- ./secrets:/secrets:Z
- ./keys:/keys:Z
expose:
- "30123"
prekeys-xmpp:
build: ./xmpp
command: -raw-address prekeys-raw -raw-port 30123 -xmpp-address xmpp-bridge -xmpp-port 31123 -shared-secret ${XMPP_COMPONENTS_SECRET} -name $PREKEY_SERVER_IDENTITY -fingerprint ${PREKEY_SERVER_FINGERPRINT}
command: -raw-address prekeys-raw -raw-port 30123 -xmpp-address xmpp-server -xmpp-port 5347 -shared-secret "${XMPP_COMPONENTS_SECRET}" -name "${PREKEY_SERVER_IDENTITY}" -fingerprint "${PREKEY_SERVER_FINGERPRINT}"
depends_on:
- prekeys-raw
- xmpp-bridge
- xmpp-server
xmpp-bridge:
image: alpine/socat
command: -d -d -d tcp-listen:31123,fork,reuseaddr unix-connect:/xmpp-components.sock
expose:
- "31123"
volumes:
- type: bind
source: /run/prosody-components.sock
target: /xmpp-components.sock
FROM prosody/prosody
USER root
RUN mkdir -p /var/run/prosody
RUN chown prosody:prosody /var/run/prosody
RUN mkdir -p /etc/prosody/conf.d
ADD ./localhost.cfg.lua /etc/prosody/conf.d/localhost.cfg.lua
RUN echo 'Include "/etc/prosody/conf.d/*.lua"' >> /etc/prosody/prosody.cfg.lua
USER prosody
EXPOSE 5222 5280 5347
ls lha /var/lib/prosody/
ls -lha /var/lib/prosody/
prosodyctl register test localhost password
exit
prosodyctl register --help
prosodyctl register alice localhost alice
prosodyctl register bob localhost bob
xit
exit
return {
["iteration_count"] = 4096;
["stored_key"] = "1c8c8e1e12463e848e436a1f4eeb8b4c9c656115";
["salt"] = "4d4b0890-3201-4520-bad8-2ab93250b084";
["server_key"] = "a8c1ce6c8ca99beacccfac18190bad26d70be8a1";
};
return {
["iteration_count"] = 4096;
["stored_key"] = "8a11b5c4dc06da5de6274a3a741842ebf190c5e9";
["salt"] = "dcaffccd-9954-4a23-ac37-50a6a23aa747";
["server_key"] = "6c2bdb26b2fa672cb13a3ecabe9ebdf125d9094d";
};
item({
[1] = {
["name"] = "active";
["attr"] = {
["xmlns"] = "http://jabber.org/protocol/chatstates";
};
};
["attr"] = {
["stamp_legacy"] = "20180808T20:01:29";
["type"] = "chat";
["to"] = "alice@localhost";
["from"] = "bob@localhost/fe6ac28e-e48a-4d28-a7c6-ab8004ba72c6";
["id"] = "purpled798a2b3";
["stamp"] = "2018-08-08T20:01:29Z";
};
["key"] = "B_qg53nXIdF7X1v1";
["when"] = 1533758489;
["with"] = "";
["name"] = "message";
});
return {
[false] = {
["version"] = 5;
["pending"] = {};
};
["bob@localhost"] = {
["groups"] = {
["Buddies"] = true;
};
["subscription"] = "both";
};
};
return {
[false] = {
["version"] = 5;
["pending"] = {};
};
["alice@localhost"] = {
["groups"] = {
["Buddies"] = true;
};
["subscription"] = "both";
};
};
component_interface = "0.0.0.0"
VirtualHost "localhost"
--Component "conference.localhost" "muc"
Component "prekeys.localhost"
component_secret = "this is secret"
name = "OTR Prekey Server"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment