Installation and Upgrading¶
Installation¶
This wizard will help you in deploying DMP.
In the last step, you will be asked where you want to deploy it. Below are the options.
Heroku¶
Deployment¶
This is the simplest option, and free for publishers with up to several hundreds of musical works. File storage and related features are not available out of the box, and file storage is very expensive if acquired through Heroku Marketplace.
Free tier has two limitations that can both be removed for $16 per month.
- Your instance goes to sleep after a while. When you access it, it takes 20-30 seconds to spin up.
- Your database is limited to 10.000 rows.
Valid e-mail address is required for registration, but no payment information.
The whole process takes under 5 minutes, and other than entering the data about the publisher and initial password, it is all menus and next-next-next when using the wizard.
Upgrading¶
While installation to Heroku is really simple, updating requires some technical knowledge. The simplest way to update is to install Heroku CLI (command line interface). It can be installed on Windows, Mac and Linux.
Then you log in, clone the repository, enter the folder, add a new remote and push:
$ heroku login
$ git clone https://github.com/matijakolaric-com/django-music-publisher.git
$ cd django-music-publisher/
django-music-publisher$ heroku git:remote --app yourapp
django-music-publisher$ git push heroku master
If you are upgrading from a version older than 20.7, you may need to delete an old buildpack, which can be found in Heroku dashboard in the Settings
tab.
Custom installation¶
DMP - Django-Music-Publisher is based on Django, which can be installed on Windows, Mac and Linux PCs and servers. For more information, consult the official Deploying Django documentation.
If you plan to use Django-Music-Publisher as one of the apps in your Django project, there is nothing special about it:
pip install --upgrade django_music_publisher
Add music_publisher.apps.MusicPublisherConfig
to INSTALLED_APPS
. Almost everything goes
through the Django Admin. The only exception is royalty calculation, which has to be added to
urls.py
from music_publisher.royalty_calculation import RoyaltyCalculationView
urlpatterns = [
...
path('royalty_calculation/', RoyaltyCalculationView.as_view(), name='royalty_calculation'),
]
There are several required settings.
Settings¶
S3 storage¶
Recommended S3 provider is Digital Ocean, it is simpler to set up and more affordable than AWS. They call S3 Spaces.
For Digital Ocean, you need to set up only four config (environment) variables.
S3_REGION
(alias forAWS_S3_REGION_NAME
) andS3_BUCKET
(alias forAWS_STORAGE_BUCKET_NAME
), you get them when you set up your Spaces, and
S3_ID
(alias forAWS_ACCESS_KEY_ID
) andS3_SECRET
(alias forAWS_SECRET_ACCESS_KEY
), you get them when you generate your Spaces API key.
If you want to use AWS or some other S3 provider, the full list of settings is available here.
Other options¶
OPTION_FORCE_CASE
- available options areupper
,title
andsmart
, converting nearly all strings to UPPER CASE or Title Case or just UPPERCASE fields to Title Case, respectively.OPTION_FILES
- enables support for file uploads (audio files and images), using local file storage