forked from server/soundboard
Add README
This commit is contained in:
parent
d6420a743a
commit
38a8d3ae1c
61
README.rst
Normal file
61
README.rst
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
===============
|
||||||
|
WIAI Soundboard
|
||||||
|
===============
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
============
|
||||||
|
|
||||||
|
- Raspberry Pi
|
||||||
|
- omxplayer (should be preinstalled on Raspbian)
|
||||||
|
- Python 3.4
|
||||||
|
- youtube-dl
|
||||||
|
- espeak
|
||||||
|
|
||||||
|
. code::
|
||||||
|
|
||||||
|
apt install espeak omxplayer python3.4 python3-pip
|
||||||
|
pip3 install virtualenv youtube-dl
|
||||||
|
|
||||||
|
It is highly recommended to install the soundboard and its dependencies into a virtual environment to keep the system clean. To do so first create a new virtual environment in the desired folder and install the remaining Python dependencies via the `pip` of the virtualenv:
|
||||||
|
|
||||||
|
. code::
|
||||||
|
|
||||||
|
virtualenv py
|
||||||
|
py/bin/pip install -r requirements.txt
|
||||||
|
|
||||||
|
Apache
|
||||||
|
------
|
||||||
|
|
||||||
|
It is also recommended to use Apache instead of the Python Flask web server.
|
||||||
|
|
||||||
|
. code::
|
||||||
|
|
||||||
|
apt install apache2 libapache2-mod-wsgi-py3
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
The web server user (e.g. `www-data`) must be in the `audio` and `video` groups. You can add them via `usermod -a -G audio,video www-data`.
|
||||||
|
|
||||||
|
Also the file `/dev/vchiq` should be writeable by the web user (e.g. `www-data`). A quick & dirty way is to use :code:`chmod +rw` on the file.
|
||||||
|
|
||||||
|
For installation of the soundboard simply check out the repository and see the doplyment chapter on how to deploy it.
|
||||||
|
|
||||||
|
Deployment
|
||||||
|
==========
|
||||||
|
|
||||||
|
Development/Debugging
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
For development and debugging the internal web server of Flask can be used e.g. by running following command inside the project folder:
|
||||||
|
|
||||||
|
. code::
|
||||||
|
|
||||||
|
FLASK_DEBUG=1 FLASK_APP=soundboard.py py/bin/flask run --host=0.0.0.0
|
||||||
|
|
||||||
|
Production
|
||||||
|
----------
|
||||||
|
|
||||||
|
For production deployment Apache (or other webservers like nginx, lighttpd etc.) should be used.
|
||||||
|
|
||||||
|
For Apache a sample configuration is provided in the folder `apache` which can be adapted.
|
||||||
Loading…
x
Reference in New Issue
Block a user