Code Monkey home page Code Monkey logo

black_candy's Introduction

Black candy logo

Black candy

Build status

Black candy is a self hosted music streaming server built with Rails and Stimulus. The goal of the project is to create a real personal music center.

Screenshot

screenshot theme dark

screenshot theme light

Getting started

Black candy use docker for simplify deployment, development and test process. So you should install docker and docker-compose first.

Black candy support mp3, m4a, ogg, opus, flac and wav formats now.

Installation

Black candy has built docker images.

First, you need clone this project to your server.

$ git clone https://github.com/aidewoode/black_candy.git

And checkout to latest version.

$ git checkout v1.0.5

Notice, the git tag you checkout must match with the version that blackcandy docker image you use, otherwise will cause some unexpected issue.

Second, set BLACK_CANDY_MEDIA_PATH and BLACK_CANDY_SECRET_KEY_BASE environment variable on your sever and point BLACK_CANDY_MEDIA_PATH to the readable directory on your server to store your music files.

# Like this
$ export BLACK_CANDY_MEDIA_PATH="/example_media_path"
$ export BLACK_CANDY_SECRET_KEY_BASE="your_secret_key"

Then, you should setup database

$ make production_setup 

Finally run:

$ docker-compose up -d

# or

$ make production_run

That's all.

You can use initial admin user to login (email: [email protected], password: foobar).

You can also change docker-compose.yml for your own needs.

Setup SSL

Black candy can use Let’s Encrypt to get certificate. If you want to enable ssl, you sould make sure your server IP associate with your domain on DNS first.

Then you need set BLACK_CANDY_DOMAIN_NAME and BLACK_CANDY_DOMAIN_EMAIL environment variable on your sever.

$ export BLACK_CANDY_DOMAIN_NAME="example.com"
$ export BLACK_CANDY_DOMAIN_EMAIL="[email protected]"

Then set ssl certificate

$ make production_set_ssl

After set ssl certificate successfully, you should set BLACK_CANDY_USE_SSL environment variable to true.

$ export BLACK_CANDY_USE_SSL="true"

Finally, restart Black candy

$ make production_restart

Update

Pull new code from remote

$ git pull origin master

And checkout to new version

$ git checkout v1.0.5

Finally run:

$ make production_update 

Development

# Clone the repo
$ git clone https://github.com/aidewoode/black_candy.git

# Setup development environment
$ make dev_setup

# Runing development server
$ make dev_run

# Stop development server
$ make dev_stop

# Into development shell
$ make dev_shell

Test

# Setup test environment
$ make test_setup

# Runing test
$ make test_run

# Runing lint
$ make test_run_lint

# Into test shell
$ make test_shell

Integrations

Black candy support get artist and album image from Discogs API. You can create a API token from Discogs and set Discogs token on Setting page to enable it.

black_candy's People

Contributors

aidewoode avatar igorpolyakov avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.