jf-guillou / lcds

Light Centralized Digital Signage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project logo

Light Centralized Digital Signage

This PHP web app is a simple digital signage manager, used to display content on any kind of browser.

Based on the Yii2 framework. See https://github.com/jf-guillou/lcds/blob/master/composer.json for the complete list of extensions used in this project.

Build Status Scrutinizer Code Quality GitHub license

Table of contents

REQUIREMENTS

  • PHP >= 7.0
    • php-curl
    • php-xml
    • php-mbstring
    • php-ldap
  • Any php-pdo supported driver and associated database
    • php-mysql with mariadb-server >= 10.0 preferably
  • mediainfo -- extract media content-type and duration
  • youtube-dl -- download media from video hosting sites
  • Composer

INSTALLATION

Requirements

apt-get install -y git php php-mbstring php-ldap php-mysql php-curl php-xml composer mariadb-server mediainfo

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Install app

cd /var/www
git clone -b production https://github.com/jf-guillou/lcds.git
cd lcds
composer install --no-dev

Database

Edit the database configuration file config/db.php according to your settings.

Make sure to modify the dbname=, username and password.

Then run the migrations to pre-fill the database :

./yii migrate --interactive=0

App configuration

Edit the app configuration file config/params.php :

  • language - Currently supported :
    • en-US
    • fr-FR
  • prettyUrl - See Enable pretty URLS
  • cookieValidationKey - Should be automatically generated by composer, should not be modified
  • proxy - Outgoing proxy if necessary, used by media downloaders
  • useSSO - If the web server is SSO enabled (CAS/Kerberos)
  • ssoEnvUsername - The HTTP environment variable containing the username from SSO
  • useLdap - Use LDAP for authentication backend
  • activeDirectorySchema - ActiveDirectory or OpenLDAP schema
  • ldapOptions - Common options for LDAP, default values should help you understand their meaning
  • cookieDuration - Cookie duration in seconds, 0 will disable cookies
  • weather - Weather renderer configuration / See https://darksky.net/dev for more details
    • language - Summary text language
    • units - Temperature units
    • apikey - API key used to fetch weather status
    • withSummary - Display text summary alongside icon

Web Server configuration

The Yii2 framework document root is in the /web folder

Apache

DocumentRoot "/var/www/lcds/web"
Enable pretty urls

Add to Apache configuration

<Directory "/var/www/lcds/web">
    # use mod_rewrite for pretty URL support
    RewriteEngine on
    # If a directory or a file exists, use the request directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Otherwise forward the request to index.php
    RewriteRule . index.php
    # ...other settings...
</Directory>

Nginx

root /var/www/lcds/web;
Enable pretty urls

Add to Nginx configuration

location / {
    # Redirect everything that isn't a real file to index.php
    try_files $uri $uri/ /index.php$is_args$args;
}

Ready

The app should be ready to use.

Default credentials are admin/admin

Do not hesitate to report bugs by posting an issue at Github

UPGRADE

cd /var/www/lcds
git pull
composer install --no-dev
./yii migrate --interactive=0

CLIENT

The client configuration mostly depends on the hardware you are going to use.

Basically, just set the homepage of the browser to your web server address with '/frontend' suffix

https://lcds-server/frontend

Raspberry Pi Client

If you want to use a Raspberry Pi, here is the setup we use.

About

Light Centralized Digital Signage

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:PHP 90.9%Language:JavaScript 8.0%Language:CSS 0.7%Language:Batchfile 0.3%