New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CB-231: Update docs for specifying single way of setting up MB database. #115
Conversation
I also tried another way for setting up the MB database https://gist.github.com/ferbncode/13f7d6a9ae0a37064f9e13c1c02a2c0f#file-intro-L41-L61. It is a good way as everything happens in a single command. But using |
docs/intro.rst
Outdated
@@ -44,15 +44,9 @@ Then you can build all the services:: | |||
|
|||
$ docker-compose -f docker/docker-compose.dev.yml build | |||
|
|||
You need MusicBrainz database containing all the MusicBrainz music metadata for setting up your application. Data dumps provided from https://musicbrainz.org can be downloaded from https://musicbrainz.org/doc/MusicBrainz_Database/Download. ``mbdump.tar.bz2`` is the core MusicBrainz database including the tables for artist, release groups etc. ``mbdump-derived.tar.bz2`` contains annotations, user tags and search indexes. The core and the derived database covers all the data required for a CritiqueBrainz server. | |||
MusicBrainz database containing all the MusicBrainz music metadata is needed for setting up your application. The ``mbdump.tar.bz2`` is the core MusicBrainz database including the tables for artist, release_group etc. ``mbdump-derived.tar.bz2`` contains annotations, user tags and search indexes. The core and the derived database covers all the data required for a CritiqueBrainz server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good if you wrapped long lines like it's done in other places in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all the MusicBrainz music metadata
I think "music" part can be removed since it's not only music.
The
mbdump.tar.bz2
is the core MusicBrainz database
It's not really a database. Can call it a database dump or an archive, otherwise it can get confusing.
for setting up your application
for setting up an instance of CritiqueBrainz
including the tables for artist, release_group etc.
which includes the tables for artist, release group, and other entities
The core and the derived database covers
These archives include
docs/intro.rst
Outdated
**Note** ``DUMPS_DIR`` should be set to the path containing the downloaded dumps. | ||
|
||
You can automatically download ``mbdump.tar.bz2`` and ``mbdump-derived.tar.bz2`` and import them by not specifying a volume:: | ||
You can automatically download the dumps (``mbdump.tar.bz2`` and ``mbdump-derived.tar.bz2``) and begin the import for the MusicBrainz database:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you call them "dumps". You should pick one term and stick to it.
docs/intro.rst
Outdated
@@ -62,7 +56,13 @@ Initialization of CritiqueBrainz database is also required:: | |||
|
|||
Then you can start all the services:: | |||
|
|||
$ docker-compose -f docker/docker-compose.dev.yml up -d | |||
$ docker-compose -f docker/docker-compose.dev.yml up -d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is indentation for code here correct?
docs/intro.rst
Outdated
|
||
.. seealso:: An alternative way for setting up the MusicBrainz database is to download the dumps manually and then do the import. Data dumps provided from https://musicbrainz.org can be downloaded from https://musicbrainz.org/doc/MusicBrainz_Database/Download. Then setup the MusicBrainz database using:: | ||
|
||
$ docker-compose -f docker/docker-compose.dev.yml run -v $DUMPS_DIR:/home/musicbrainz/dumps -v $PWD/data/mbdata:/var/lib/postgresql/data/pgdata musicbrainz_db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good idea to split long lines of commands into multiple using \
. That way all of it is going to be visible without having to scroll.
docs/intro.rst
Outdated
|
||
$ docker-compose -f docker/docker-compose.dev.yml run -v $DUMPS_DIR:/home/musicbrainz/dumps -v $PWD/data/mbdata:/var/lib/postgresql/data/pgdata musicbrainz_db | ||
|
||
**Note**: ``DUMPS_DIR`` should be set to the path containing the downloaded dumps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be clarified before the command. Also, it's better to say explicitly what DUMPS_DIR
is (an environment variable).
I updated the docs for focusing on a single way for setting up the MusicBrainz database. Also sent a PR for updating the download of dumps with retries: metabrainz/musicbrainz-server#527.