-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from xibosignage/develop
Release 0.4
- Loading branch information
Showing
14 changed files
with
344 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
vendor/ | ||
.project/ | ||
.vagrant/ | ||
.idea/ | ||
config.json |
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,22 @@ | ||
FROM alpine:3.6 | ||
MAINTAINER Spring Signage Ltd <[email protected]> | ||
|
||
ENV XMR_DEBUG false | ||
ENV XMR_QUEUE_POLL 5 | ||
ENV XMR_QUEUE_SIZE 10 | ||
ENV XMR_IPV6RESPSUPPORT false | ||
ENV XMR_IPV6PUBSUPPORT false | ||
|
||
RUN apk update && apk upgrade && apk add tar php7 curl php7-zmq php7-phar php7-json php7-openssl && rm -rf /var/cache/apk/* | ||
|
||
EXPOSE 9505 50001 | ||
|
||
COPY ./entrypoint.sh /entrypoint.sh | ||
COPY . /opt/xmr | ||
|
||
RUN chown -R nobody /opt/xmr && chmod 755 /entrypoint.sh | ||
|
||
# Start XMR | ||
USER nobody | ||
|
||
CMD ["/entrypoint.sh"] |
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 |
---|---|---|
@@ -1,32 +1,77 @@ | ||
# Introduction | ||
Xibo - Digital Signage - http://www.xibo.org.uk | ||
Copyright (C) 2006-2015 Daniel Garner and Contributors. | ||
Copyright (C) 2006-2018 Spring Signage Ltd and Contributors. | ||
|
||
This is the Xibo Message Relay (XMR) repository. | ||
|
||
XMR is a php application built on ReactPHP which acts as a ZeroMQ message exchange between the Xibo CMS and connected | ||
Xibo Players. It doesn't do anything beyond forward messages from the CMS to a pub/sub socket. | ||
XMR is a php application built on ReactPHP which acts as a ZeroMQ message exchange between the Xibo CMS and connected Xibo Players. It doesn't do anything beyond forward messages from the CMS to a pub/sub socket. | ||
|
||
It is packaged into a PHAR file which is included in the [Xibo CMS](https://github.com/xibosignage/xibo-cms) release files. | ||
|
||
**If you are here for anything other than software development purposes, it is unlikely you are in the right place. XMR is shipped with the Xibo CMS installation and you would usually install it from there.** | ||
|
||
|
||
It is packaged into a PHAR file which is included in the [Xibo CMS](https://github.com/xibosignage/xibo-cms) release | ||
files. | ||
|
||
## Installation | ||
The install, use composer: | ||
XMR can be run using Docker and Compose, for example: | ||
|
||
```yaml | ||
version: "3" | ||
|
||
services: | ||
xmr: | ||
image: xibosignage/xibo-xmr:latest | ||
ports: | ||
- "9505:9505" | ||
- "50001:50001" | ||
``` | ||
You may also build this library from source code: | ||
1. Clone this repository | ||
2. Run `./build.sh` | ||
3. Run `docker-compose up --build` | ||
|
||
|
||
|
||
You may also reference this code in your own projects via Composer: | ||
|
||
```bash | ||
composer require xibosignage/xibo-xmr | ||
``` | ||
|
||
|
||
|
||
### Ports | ||
|
||
XMR requires a listen address and a publish address and therefore needs 2 ports. The listen address is used for communication with the CMS (incoming comms) and the publish address is used for outgoing messages. | ||
|
||
When running in Docker, you will want to expose these ports to your machine OR connect your container to a Docker network which will facilitate communication with these ports. | ||
|
||
An example ports directive would be: | ||
|
||
``` yaml | ||
ports: | ||
- "9505:9505" #Publish | ||
- "50001:50001" #Listen | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
## Licence | ||
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/>. | ||
|
||
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/>. | ||
|
||
|
||
|
||
#### 3rd Party | ||
|
||
We use BOX to package the PHAR file - see https://github.com/box-project/box2 |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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 |
---|---|---|
|
@@ -11,6 +11,6 @@ | |
} | ||
], | ||
"main": "index.php", | ||
"output": "/home/vagrant/xmr.phar", | ||
"output": "bin/xmr.phar", | ||
"stub": true | ||
} |
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,12 @@ | ||
#!/usr/bin/env bash | ||
docker run --rm \ | ||
--volume $PWD:/app \ | ||
composer install --ignore-platform-reqs --optimize-autoloader | ||
|
||
docker run --rm --name xmr-build \ | ||
-v "$PWD":/usr/src/myapp \ | ||
-w /usr/src/myapp php:7.0-cli \ | ||
/bin/bash -c "echo 'phar.readonly = Off' > /usr/local/etc/php/php.ini; curl -LSs https://box-project.github.io/box2/installer.php | php; php box.phar build; rm box.phar" | ||
|
||
#docker rmi composer | ||
#docker rmi php:7.0-cli |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
version: "3" | ||
|
||
services: | ||
xmr: | ||
build: . | ||
environment: | ||
XMR_DEBUG: "true" |
Oops, something went wrong.