/sharemusic

A web based audio streaming application allowing you to access your music from anywhere, using almost any internet enabled device.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

ShareMusic

Build Status

This is a rewrite of CherryMusic based on Django and AngularJS.

You can test it at: http://music.openrock.mooo.com/

  • User: test
  • Password: 1234

Setup

Config file

Create config.yml with your music directories:

  • One path:
web:
  volumes:
    - /home/user/My Music:/usr/src/app/music:ro
  • Multiple paths:
web:
  volumes:
    - /home/user/Classic Music:/usr/src/app/music/Classic:ro
    - /home/user/Punk Music:/usr/src/app/music/Punk:ro

Add enviroment variables:

  • SECRET_KEY: Django secret key
  • DEBUG: show debug information in log.

Example config.yml:

web:
  volumes:
    - /home/user/My Music:/usr/src/app/music:ro
  environment:
    - SECRET_KEY=p0py3a&i7w^!#nfitarp&7p!0bj3j4!aez3huh)53!=ud128f(
    - DEBUG

nginx:
  ports:
    - "80:80"

Install dependencies:

Install all:

#Create containers
docker-compose pull && \
docker-compose up -d && \

#Initialice database
docker-compose run --rm web python3 manage.py migrate auth && \
docker-compose run --rm web python3 manage.py migrate && \

#Collect static files
docker-compose run --rm web python3 manage.py collectstatic

Default admin user: admin/admin

Reinstall ShareMusic

docker-compose stop
docker-compose rm

And then reinstall.

Update ShareMusic

docker-compose stop
docker-compose rm web
docker-compose build
docker-compose up -d

Development frotent

To install and run development containers:

docker-compose  -f docker-compose.dev.yml down && \
docker-compose -f docker-compose.dev.yml build && \
docker-compose -f docker-compose.dev.yml up -d && \
docker-compose -f docker-compose.dev.yml run --rm web_dev python3 manage.py migrate auth && \
docker-compose -f docker-compose.dev.yml run --rm web_dev python3 manage.py migrate

Install bower components:

docker-compose -f docker-compose.dev.yml run  --rm web_dev python3 manage.py bower_install -- --allow-root

Update static files

In development mode:

docker-compose -f docker-compose.dev.yml run --rm web_dev python3 manage.py collectstatic

Tests

Test backend:

./test_scripts/run_tests.sh