Skip to content

Manual Installation

Scott edited this page Feb 20, 2023 · 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):
echo "files = $HOME/led-board-manager/supervisor-daemon.conf" >> scoreboard/static/supervisor/supervisord.conf
sudo mkdir /etc/supervisor && sudo cp ~/led-board-manager/scoreboard/static/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
sudo chmod 644 /etc/supervisor/supervisord.conf

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

sudo python3 -m pip install supervisor

sudo systemctl unmask supervisord
sudo systemctl enable --now supervisord

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-dev
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 --upgrade pip
pip3 install --upgrade setuptools
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 collectstatic
python3 manage.py test

See also: Auto-Starting the Server

Clone this wiki locally