Skip to content

Commit

Permalink
XMR: implement 2 relay modes (one for horizontal scaling of new XMR, …
Browse files Browse the repository at this point in the history
…one for handling old XMR messages)
  • Loading branch information
dasgarner committed Dec 27, 2024
1 parent 518e566 commit a776f7d
Show file tree
Hide file tree
Showing 8 changed files with 507 additions and 43 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ENV XMR_DEBUG=false
ENV XMR_QUEUE_POLL=5
ENV XMR_QUEUE_SIZE=10
ENV XMR_IPV6PUBSUPPORT=false
ENV XMR_RELAY_OLD_MESSAGES=false
ENV XMR_RELAY_MESSAGES=false

RUN apt-get update && apt-get install -y libzmq3-dev git \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"react/react": "^1.4",
"react/socket": "^1.16",
"react/zmq": "^0.4.0",
"cboden/ratchet": "^0.4.4"
"cboden/ratchet": "^0.4.4",
"guzzlehttp/guzzle": "^7.9"
},
"autoload": {
"psr-4": {
Expand Down
263 changes: 262 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 24 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
#!/bin/sh

#
# Copyright (C) 2024 Xibo Signage Ltd
#
# Xibo - Digital Signage - https://xibosignage.com
#
# This file is part of Xibo.
#
# Xibo is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# Xibo is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Xibo. If not, see <http://www.gnu.org/licenses/>.
#

# Write config.json
echo '{' > /opt/xmr/config.json
echo ' "sockets": {' >> /opt/xmr/config.json
Expand All @@ -10,7 +31,9 @@ echo ' },' >> /opt/xmr/config.json
echo ' "queuePoll": '$XMR_QUEUE_POLL',' >> /opt/xmr/config.json
echo ' "queueSize": '$XMR_QUEUE_SIZE',' >> /opt/xmr/config.json
echo ' "debug": '$XMR_DEBUG',' >> /opt/xmr/config.json
echo ' "ipv6PubSupport": '$XMR_IPV6PUBSUPPORT >> /opt/xmr/config.json
echo ' "ipv6PubSupport": '$XMR_IPV6PUBSUPPORT',' >> /opt/xmr/config.json
echo ' "relayOldMessages": '$XMR_RELAY_OLD_MESSAGES',' >> /opt/xmr/config.json
echo ' "relayMessages": '$XMR_RELAY_MESSAGES >> /opt/xmr/config.json
echo '}' >> /opt/xmr/config.json

/usr/local/bin/php /opt/xmr/index.php
Loading

0 comments on commit a776f7d

Please sign in to comment.