Experimental radio CMS based on Flask (Python) micro-framework for Radio Rhino (Strasbourg). http://radiorhino.eu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
/\/ \-/ ❭❬ 01248c780e fixed README.md, added TABLES.rst for table description, and structure.dot for a graphviz representation of tables 7 months ago
app fixed README.md, added TABLES.rst for table description, and structure.dot for a graphviz representation of tables 7 months ago
doc Little model refactoring + lorem & nuke commands 1 year ago
liquidsoap Liquidsoap webhook integration (in progress) 1 year ago
migrations Correcting pages id for about and contribute 1 year ago
rhino_ynh Correcting __init__ of Events. 1 year ago
.gitignore fixed README.md, added TABLES.rst for table description, and structure.dot for a graphviz representation of tables 7 months ago
README.html fixed README.md, added TABLES.rst for table description, and structure.dot for a graphviz representation of tables 7 months ago
README.md fixed README.md, added TABLES.rst for table description, and structure.dot for a graphviz representation of tables 7 months ago
TABLES.pdf fixed README.md, added TABLES.rst for table description, and structure.dot for a graphviz representation of tables 7 months ago
TABLES.rst fixed README.md, added TABLES.rst for table description, and structure.dot for a graphviz representation of tables 7 months ago
config.py cleaning config 1 year ago
gunicorn.py Misc fixes, moving admin to /site/admin 1 year ago
manage.py cleaning config 1 year ago
requirements.txt correcting small typos 7 months ago
run_dev_server.sh correcting small typos 7 months ago
structure.dot fixed README.md, added TABLES.rst for table description, and structure.dot for a graphviz representation of tables 7 months ago
structure.png fixed README.md, added TABLES.rst for table description, and structure.dot for a graphviz representation of tables 7 months ago
wsgi.py Lot of shit to fix to get it working in prod 1 year ago

README.md

Rhino Radio CMS

Experimental webradio CMS based on Flask micro-framework designed for Radio Rhino with YunoHost (not absolutely required but necessary to protect admin).

Install

# On Debian-based distros
sudo apt-get install python3 python3-pip python3-virtualenv virtualenv

###
# If you want to create a virtual environment (i.e. for development purpose)

mkdir ~/.pyvenv
virtualenv -p python3 ~/.pyvenv/rhinoradiocms

source ~/.pyvenv/rhinoradiocms/bin/activate

#
###

###
# If you want to use a local postgresql server

# PostgreSQL and GIS (geographic db)
sudo apt-get install python3-dev postgresql-9.6 postgresql-server-dev-9.6 postgis

# Start PostgreSQL
systemctl start postgresql

sudo su postgres
psql
>>> CREATE DATABASE rhino;
>>> \c rhino;
>>> CREATE EXTENSION postgis;
>>> CREATE USER "rhino";
>>> GRANT ALL ON DATABASE rhino TO "rhino";
>>> \q

#
###

###
# If you want to compile Sass CSS on your machine
sudo apt-get install ruby ruby-dev

gem install --user-install sass
# or
sudo gem install sass

#
###


# WARNING installing with pip will require administrator rights if not installing in a virtual environment, or install with --user
pip install -r requirements.txt

# if needed :
#createlang plpgsql gis

Init the base

# (Re-)initialize database
python3 manage.py nuke

# Feed database with random placeholder values
python3 manage.py lorem

Develop

Run dev server

python3 manage.py runserver

Admin

Admin interface on : http://domain.tld/admin

Deployment with Gunicorn

Install Gunicorn

pip3 install Gunicorn

More to come.

Uncomment ‘#scheme=“https”’ in views.py

Add environment variables to /lib/systemd/system :

  • AIRTIME_API_KEY
  • STREAM_URL
  • SECRET_KEY
  • FLASK_CONFIG=‘production’

If your podcast files are on a distant machine : set an autofs + sshfs on app/static/podcasts :

sshfs user@distant-ip:/podcasts/dir/

Prod upgrade

git pull
git merge origin master
sass app/static/scss/style.scss:app/static/css/style.css --style compressed
service rhinosite restart

Doc

Eeeeeeeh… Soon™.

Install Sphinx

pip3 install Sphinx