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.
 
 
 
 
 
 
Pierre c5bee94d8d
annoying to do it manually lol
10 months ago
.github Bump actions/checkout from 2 to 2.3.4 1 year ago
backend updated 10 months ago
concourse Bump python image in Concourse to 3.9.2 1 year ago
examples this adds songs every 3 hours automatically 11 months ago
frontend channel switching and volume 10 months ago
scripts annoying to do it manually lol 10 months ago
.flake8 Use Python 3 flake8 in Travis 5 years ago
.gitignore gitignore actual config file 5 years ago
.gitmodules Simple compiler for the frontend 5 years ago
.jshint Add jshint to travis checks 5 years ago
LICENSE Add a license and a readme 5 years ago
README.md Update README.md 11 months ago
config.json.example Fetch listener metrics from prometheus 1 year ago

README.md

lain.void.yt

Online radio for lainons. Forked from lainon.life by barrucadu because i run it on a debian VM.

If you want to set it up on a debian10 VM you can follow this tutorial.

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.
  • 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.

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

The examples/ directory contains sample configuration for nginx, Icecast, MPD, Crontab, and Systemd.

For those that use debian 10 to host lainonlife,

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
    $ CONFIG=../config.json HTTP_DIR=/srv/http PORT=5000 ./run.sh
    

Frontend development

Frontend development is setup with pipenv. Initially you have to run pipenv install in the frontend subdirectory.

There are 3 essential scripts for development:

  • build: builds the static site, its out put can be found in frontend/_site
  • watch: watches the source files for changes and rebuilds
  • serve: watches the source files and also run a local webserver on localhost

You can run these scripts like so: pipenv run build