Skip to content
/ djRDO Public

Lightweight music collection manager for DJs

Notifications You must be signed in to change notification settings

gbip/djRDO

Repository files navigation

djRDO

djRDO banner

djRDO is a free software that allows dj to manage their music collection.

At the moment it is geared towards djs that are using CD players.

Features

  • Lightweight application : only your music metadata is uploaded to the server, not the whole file
  • Gain new insight on your collection : find holes in your collection
  • Group your music by collection

Screenshots

Collection view screenshot Collection view screenshot Collection view screenshot Collection view screenshot

Development

Manual setup

First clone the repo and install the dependencies. This project uses pipenv to manage the python dependencies

git clone https://github.com/gbip/djRDO
cd djRDO
pipenv shell # Move into the virtual environment

However, before installing the dependencies, you need to install a few packages that are needed by the mysql, postgresql, drawSvg and argon2 python libraries:

On Ubuntu-based distro you can install those packages with :

sudo apt install gcc musl-dev postgresql-dev musl-dev libffi-dev mariadb-connector-c-dev mariadb-dev libcairo2

On Arch-based distro you can install them with :

postgresql python-mysqlclient python-argon2_cffi cairo
pipenv install # Install dependencies

All django commands must be typed in the pipenv shell ! So stay in the pipenv shell at the end of the process.

You will need to create a .env file that defines your database configuration. Some examples are provided (.env.*). To use sqlite3 as a database (recommended for development) use this command :

ln -s .env.sqlite3 .env

Then, you can create the database :

# Still in pipenv shell
python manage.py migrate

To launch a development web server :

python manage.py runserver

To run the test suite :

python manage.py test

Using docker

A docker-compose configuration file is provided for this project. Docker configuration lives in ./docker. You should copy/symling them to this project root folder, and modify them accordingly.

Here is a suggested way to do it :

ln -s docker/docker-compose.yml # Developement docker-compose
ln -s docker/Dockerfile .		# Needed by the docker-compose file
cp docker/.env.docker.dev .		# djRDO configuration file

Configuration

Currently, the application is configured using a .env file. The provided .env.sqlite3 makes a good candidate for a development configuration.

Options

  • DEMO_ENABLED : enables the demo message and loads a pre-filled database. It does not take care of flushing the database every hour, this needs to be automated using a system tool (eg crontab).
  • REGISTRATION_ENABLED : enabled by default, set to false to disable registration

Deployment

With docker

The current docker-compose setup spins up a nginx reverse proxy along with let's encrypt certificates for https. Two versions are provided :

  • a staging version which uses the staging letsencrypt environment
  • a production version which uses the production letsencrypt environment

Docker environment files are named using the following syntax : .env.docker.(staging | prod).(nginx|djrdo|postgre). Where djrdo is the python configuration, postgre the database configuration and nginx some of the nginx config. The other part of the nginx configuration lives in ./nginx

Before running any docker command, you should modify the files .env.docker.prod.*.example to suit your setup. I suggeste that you copy those files to the root of this repository to avoid any conflict when upgrading :

cp docker/.env.docker.prod .
# edit .env.docker.prod.( djrdo | nginx | postgre)
ln -s docker/Dockerfile.prod # This file is maintained by us, you should not have to change it
ln -s docker/docker-compose.prod.yml # Same

Then, starting djRDO can be done using either of the following commands :

sudo docker-compose -f docker-compose.prod.yml up # Production version

Without docker

Not documented yet.