GithubHelp home page GithubHelp logo

juanmiret / black_candy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blackcandy-org/blackcandy

0.0 1.0 0.0 11.09 MB

A self hosted music streaming server

License: MIT License

JavaScript 11.38% Ruby 57.48% CSS 12.80% HTML 17.52% Dockerfile 0.29% Shell 0.23% Nix 0.29%

black_candy's Introduction

Black candy logo

Black candy

CI Coverage Status Ruby Style Guide Docker Pulls

Black candy is a self hosted music streaming server built with Rails and Hotwire. 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, oga, opus, flac, wma and wav formats now.

Installation

Black candy has built docker images. You can use docker compose to run all services.

First, you should ensure your music files stored under "/media_data"

Then run:

$ curl https://raw.githubusercontent.com/aidewoode/black_candy/v2.0.1/docker-compose.yml > docker-compose.yml
$ docker-compose up -d

That's all. Now, you can use initial admin user to login (email: [email protected], password: foobar).

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

Note: When the SECRET_KEY_BASE environment variable is not set, Black candy will generate SECRET_KEY_BASE environment variable every time when service start up. This will cause old sessions invalid, You can set your own SECRET_KEY_BASE environment variable on docker service to avoid it.

Try in PWD

Try in PWD

Click the button above, then you can try black candy on Play with Docker.

When the service is ready, access black candy from port 80. Then use initial admin user to login (email: [email protected], password: foobar). This demo already contains some sample music file. You can go to the setting page and click the sync button of the media path to import the sample music into the database.

And feel free to try it.

List for all sample music for the demo:

If like their music, you can buy their albums to support them.

Upgrade

Pull new image from remote

$ docker pull blackcandy/blackcandy

Restart services:

$ docker-compose restart 

Development

Requirements

  • Ruby 2.7
  • Postgres 11
  • Redis 6.0
  • Nodejs 12
  • Yarn 1.22
  • Imagemagick 7
  • ffmpeg 4.3

You can use nix to setup dev environment easily.

# First, install nix. You can check out the nix doc for more details.
$ curl -L https://nixos.org/nix/install | sh

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

# Change to the directory.
$ cd black_candy

# Go into nix shell, the nix shell will auto setup all dev requirements you need.
$ nix-shell 

# Install requirement gems.
$ bundle

# Install npm packages.
$ yarn

# Setup database.
$ rails db:setup

# Finally, start all services.
$ ./bin/dev 

Test

# Runing test
$ rails test RAILS_ENV=test 

# Runing lint
$ rails lint:all 

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 dependabot[bot] avatar igorpolyakov avatar mastert avatar

Watchers

 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.