CSS Python HTML JavaScript Shell PLpgSQL Other
Latest commit 94ebb58 Feb 22, 2017 @mayhem mayhem committed on GitHub Merge pull request #128 from paramsingh/token-regen
LB-71: Token regeneration
Permalink
Failed to load latest commit information.
admin Streamline init_db and init_test_db setup Feb 2, 2017
bigquery-writer Minor tweak to make bigquery writer less annoying Feb 21, 2017
db Add some exception handling in the update_token code. Feb 22, 2017
docker Use logging instead of print function and use exceptions for error-check Feb 19, 2017
docs Update requirements for documentation Jul 22, 2016
influx-writer Rename INFLUX_DB to INFLUX_DB_NAME Feb 1, 2017
listenstore Move testing to a dedicated container and volume less containers. Feb 1, 2017
redis-consumer Finish debugging the new pub sub class Aug 29, 2016
tests Finish implementing the test for pubsub Sep 3, 2016
webserver Improve error message shown to user on failure of token reset. Feb 22, 2017
.dockerignore Split up Docker Compose file into two: for development and production Jul 28, 2016
.gitignore Added a HACKING file for short cuts to common commands. Minor other f… Aug 31, 2016
.kitchen.yml make sure we install pg 9.4 correctly Sep 16, 2015
API_compatible_README.md Update description for API_compat usage + Cleanup Jul 28, 2016
HACKING.md Fix existing tests. Sep 1, 2016
LICENSE Re-adding the LICENSE and README files Sep 5, 2015
README.md Fixed a flag and removed vagrant doc section. Feb 18, 2017
alpha_importer.py Fix the delay not defined problem. Feb 19, 2017
config.py.sample Remove extra `/` from ALPHA_URL Feb 19, 2017
develop.sh Move prod files to non-prod files, since prod is not used in actual p… Feb 18, 2017
fabfile.py Add fabric Sep 6, 2015
integration-test.sh Bare bones integration setup is working and all the containers requir… Feb 8, 2017
listen.py Attempting to fix more tests and make the listenstore fully consisten… Sep 6, 2016
manage.py Convert tabs to spaces in manage.py Feb 8, 2017
pytest.ini Finish implementing the test for pubsub Sep 3, 2016
redis_pubsub.py batch size, batch timeout, whatever. added two more static page tests Sep 4, 2016
requirements.txt Write a python script for moving data from LB alpha to beta Feb 19, 2017
set_rate_limits.py Fix the order of reported limits Aug 31, 2016
test.sh Modify test script to be used interactively and noninteractively Feb 7, 2017

README.md

listenbrainz-server

Server for the ListenBrainz project.

Installation

These instructions are meant to get you started quickly with development process. Installation process in production environment might be different.

Prerequisites

In order to install ListenBrainz onto your machine or a VM, you will need to install:

Configuration file

Copy the file config.py.sample to config.py:

$ cp config.py.sample config.py

Next, register for a MusicBrainz application:

https://musicbrainz.org/account/applications

During registration set the callback url to

http://<your_host>/login/musicbrainz/post

Where is the DNS name or IP address of the machine running ListenBrainz.

Then set the MUSICBRAINZ_CLIENT_ID and MUSICBRAINZ_CLIENT_SECRET in config.py to the OAuth Client ID and OAuth Client Secret of your application.

Start the services

$ ./develop.sh

This will automatically download all the needed software and build and start the necessary containers needed to run ListenBrainz.

Database initialization

To initialize the database (create user, tables, etc.) run these commands:

$ docker exec -it listenbrainz_web_1 python manage.py init_db --create-db
$ docker exec -it listenbrainz_web_1 python manage.py init_msb_db --create-db
$ docker exec -it listenbrainz_influx_writer_1 python admin/influx/create_db.py

After that server should be ready to go. Go to http://localhost:8000 and load the ListenBrainz home page.

Running tests

In order to run the tests for ListenBrainz, simply run:

$ ./test.sh

This will build and run the containers needed to run the tests. Each of these containers will not use volumes that link to data outside of the containers and thus will not interfere with production databases.

Documentation

Documentation for the ListenBrainz API is available at https://listenbrainz.readthedocs.org. You can build the documentation yourself:

$ cd ~/listenbrainz/docs
$ make clean html