![]() |
7 months ago | |
---|---|---|
app | 7 months ago | |
doc | 1 year ago | |
liquidsoap | 1 year ago | |
migrations | 1 year ago | |
rhino_ynh | 1 year ago | |
.gitignore | 7 months ago | |
README.html | 8 months ago | |
README.md | 7 months ago | |
TABLES.pdf | 8 months ago | |
TABLES.rst | 8 months ago | |
config.py | 7 months ago | |
gunicorn.py | 7 months ago | |
manage.py | 7 months ago | |
requirements.txt | 8 months ago | |
run_dev_server.sh | 7 months ago | |
structure.dot | 8 months ago | |
structure.png | 8 months ago | |
wsgi.py | 1 year ago |
Experimental webradio CMS based on Flask micro-framework designed for Radio Rhino with YunoHost (not absolutely required but necessary to protect admin).
# 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" WITH PASSWORD "mypassword";
>>> 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
# If you modified the password "mypassword", change the
# url of the variable SQLALCHEMY_DATABASE_URI in the following format
# postgresql://user:password@hostname/rhino
# (Re-)initialize database
python3 manage.py nuke
# Feed database with random placeholder values
python3 manage.py lorem
python3 manage.py runserver
http://127.0.0.1:5000/site
python3 manage.py routes
Admin interface on : http://domain.tld/admin
pip3 install Gunicorn
More to come.
Uncomment ‘#scheme=“https”’ in views.py
Add environment variables to /lib/systemd/system :
If your podcast files are on a distant machine : set an autofs + sshfs on app/static/podcasts :
sshfs user@distant-ip:/podcasts/dir/
git pull
git merge origin master
sass app/static/scss/style.scss:app/static/css/style.css --style compressed
service rhinosite restart
Eeeeeeeh… Soon™.
pip3 install Sphinx