Skip to content

Manual Installation

Scott edited this page Jun 20, 2021 · 13 revisions

From the /home/pi directory:

(or the same location as your nhl-led-scoreboard directory)
git clone --recursive https://github.com/sflems/led-board-manager.git
cd led-board-manager
touch .secret.txt
chmod g+w .secret.txt
Install supervisor (as root):
su
mkdir /etc/supervisor && cp /home/pi/led-board-manager/scoreboard/static/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
chmod 644 /etc/supervisor/supervisord.conf

cp /home/pi/led-board-manager/scoreboard/static/supervisor/supervisord.service /etc/systemd/system/supervisord.service
chmod 644 /etc/systemd/system/supervisord.service

python3 -m pip install supervisor

systemctl unmask supervisord
systemctl enable supervisord 
su pi

mv sample.supervisor-daemon.conf supervisor-daemon.conf

If you have the MLB Board installed (in default location):

cp ~/led-board-manager/scoreboard/static/schema/mlb.config.schema.json ~/mlb-led-scoreboard/config.schema.json

If you have the NFL Board installed (in default location):

cp ~/led-board-manager/scoreboard/static/schema/nfl.config.schema.json ~/nfl-led-scoreboard/config.schema.json

Follow either command with:

sudo supervisorctl reread && sudo supervisorctl reload
Sample configurations can be found in the nhl-led-scoreboard-img project, by @falkyre.
Install python3-venv and create the Web Gui environment:
sudo apt install python3-venv
python3 -m venv env
source env/bin/activate

Your shell should have the (env) prepended if active:

(env) pi@raspberrypi:~/led-board-manager $ 

To exit the (env) at any time after installing and running the test step, enter the command deactivate in the terminal.

Install the app requirements and dependencies from the included requirements.txt file:
pip3 install -r requirements.txt
Once complete, we'll make, migrate and fill our sqlite3 database with the supplied teams data in the fixtures folder:
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py loaddata teams.json
python3 manage.py test

See also: Auto-Starting the Server

Clone this wiki locally