Site and scripts for lainon.life
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
backend Remove random webm page Sep 17, 2017
examples Add configuration section to README and include example files Jul 8, 2017
frontend Add a link to Pleroma Sep 22, 2018
scripts
.flake8 Use Python 3 flake8 in Travis Jul 10, 2017
.gitignore gitignore actual config file Aug 4, 2017
.gitmodules Simple compiler for the frontend Jul 2, 2017
.jshint Add jshint to travis checks Jul 9, 2017
.travis.yml Use Python 3 flake8 in Travis Jul 10, 2017
LICENSE Add a license and a readme Jul 2, 2017
README.md Rewrite frontend template logic in Python Aug 27, 2017
config.json.example gitignore actual config file Aug 4, 2017

README.md

lainon.life

Online radio for lainons.

Assumptions

There are some assumptions in the code you might have to fix before deploying for real elsewhere:

  • backend.py assumes that it has write access to the upload directory.
  • metrics.py probably assumes a lot about permissions.
  • schedule.py assumes that bumps are in the album "Lainchan Radio Transitions".

These shouldn't really matter for development. Some things might not work properly, that's it. There might be more things.

Configuration

There are a few files you might reasonably want to edit if you deploy this code:

  • config.json, the list of channels, MPD details, and frontend asset template details.
  • frontend/static/schedule.json, the live broadcast schedule.

The lainon.life server is running NixOS, and the entire system configuration (sans passwords) is on github.

For those who don't read Nix, the examples/ directory contains sample configuration for nginx, Icecast, and MPD.

Usage

  1. Configure your webserver.

    See the examples/ directory for help.

  2. Build the frontend assets.

    $ cd frontend
    $ ./run.sh ../config.json
    

    If all goes well, the directory _site now contains all the frontend assets.

  3. Put the frontend assets where you told the server they would be.

    $ cp -r frontend/_site/* /srv/http
    
  4. Start the backend on the port you told the server it would be.

    $ cd backend
    $ ./run.sh --config=../config.json --http-dir=/srv/http 5000
    

I want to help!

Great! See the open issues. You can also find me on irc.lainchan.org.