Xibo Content Management System
Xibo - Digital Signage - https://xibo.org.uk Copyright (C) 2006-2021 Xibo Signage Ltd and Contributors.
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/.
Installing an official release is described in the manual and in the release notes of each release.
Please only install a Development environment if you intend make code changes to Xibo. Installing from the repository is not suitable for a production installation.
Xibo uses Docker to ensure all contributors have a repeatable development environment which is easy to get up and running.
The very same Docker containers are used in our recommended end user installation to promote consistency from development to deployment.
To these ends this repository includes a
docker-compose.ymlfile to spin up a model development environment.
The development Docker containers do not automatically build vendor files for PHP or JS, this is left as a developer responsibility. Therefore you will need the following tools:
Create a folder in your development workspace and clone the repository. If you intend to make changes and submit pull requests please Fork us first and create a new branch.
git clone [email protected]:/xibo-cms.git xibo-cms
Change into your new folder
We recommend installing the dependencies via Docker, so that you are guarenteed consistent dependencies across different development machines.
docker run --interactive --tty --volume $PWD:/app --volume ~/.composer:/tmp composer install
This command also mounts the Composer
/tmpfolder into your home directory so that you can take advantage of Composer caching.
docker run -it --volume $PWD:/app --volume ~/.npm:/root/.npm -w /app node:12 sh -c "npm install webpack -g; npm install; npm run build;"
The development version of Xibo expects the code base to be mapped into the container such that changes on the host are reflected in the container.
However, the container itself creates some files, such as the twig cache and library uploads. These locations will need to be created and the container given access to them.
The easiest way to do this is to make the
chmod 777them. Obviously this is not suitable for production, but you shouldn't be using these files for production (we have containers for that).
The API requires a pub/private RSA keypair and an encryption key to be provided. The docker entrypoint will create these in
You can override the generated keys paths and encryption key by providing an alternative in
settings-custom.php. For example:
$apiKeyPaths = [ 'publicKeyPath' => '/var/www/cms/custom/public.key', 'privateKeyPath' => '/var/www/cms/custom/private.key', 'encryptionKey' => '' ];
Use Docker Compose to bring up the containers.
docker-compose up --build -d
After the containers have come up you should be able to login with the details:
To parse the translations:
docker-compose exec web sh -c "cd /var/www/cms; rm -R ./cache" docker-compose exec web sh -c "cd /var/www/cms; php bin/locale.php"
find ./locale ./cache ./lib ./web -iname "*.php" -print0 | xargs -0 xgettext --from-code=UTF-8 -k_e -k_x -k__ -o locale/default.pot
To import translations:
bzr pull lp:~dangarner/xibo/swift-translations
for i in *.po; do msgfmt "$i" -o $(echo $i | sed s/po/mo/); done
Move the resulting
mofiles into your
To generate a
swagger.jsonfile, with the dev containers running:
docker-compose exec web sh -c "cd /var/www/cms; vendor/bin/swagger lib -o web/swagger.json"
To find out more about the application code and how everything fits together, please refer to the developer docs.