barrucadu / lainonlife

RIP lainchan radio, taken out by HDD failure.
https://lainon.life
MIT License
57 stars 12 forks source link

lainon.life

Online radio for lainons.

Assumptions

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

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:

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
    $ 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:

You can run these scripts like so: pipenv run build

I want to help!

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