diff --git a/.gitignore b/.gitignore index 25b088739964de23eb6ab5916132062e65d931fb..2582cc534fa5fb6be2667c879fd6a0342168432d 100644 --- a/.gitignore +++ b/.gitignore @@ -90,3 +90,4 @@ data/ po/*.po docs/swagger +_build diff --git a/changes/changelog.d/254.enhancement b/changes/changelog.d/254.enhancement new file mode 100644 index 0000000000000000000000000000000000000000..4655dc41122d5aa6e242ecb8a1c14c581c4e756c --- /dev/null +++ b/changes/changelog.d/254.enhancement @@ -0,0 +1 @@ +Documented a saner layout with symlinks for in-place imports (#254) diff --git a/docs/importing-music.rst b/docs/importing-music.rst index b190dff368f1fae04b6a14860aaf799cb4673242..b40eb7b88843b39eff40d2cad7d2cf6bbe91510c 100644 --- a/docs/importing-music.rst +++ b/docs/importing-music.rst @@ -76,6 +76,39 @@ configuration options to ensure the webserver can serve them properly: Thus, be especially careful when you manipulate the source files. +We recommend you symlink all your music directories into ``/srv/funkwhale/data/music`` +and run the `import_files` command from that directory. This will make it possible +to use multiple music music directories, without any additional configuration +on the webserver side. + +For instance, if you have a NFS share with your music mounted at ``/media/mynfsshare``, +you can create a symlink like this:: + + ln -s /media/mynfsshare /srv/funkwhale/data/music/nfsshare + +And import music from this share with this command:: + + python api/manage.py import_files "/srv/funkwhale/data/music/nfsshare/**/*.ogg" --recursive --noinput --in-place + +On docker setups, it will require a bit more work, because while the ``/srv/funkwhale/data/music`` is mounted +in containers, symlinked directories are not. To fix that, in your ``docker-compose.yml`` file, ensure each symlinked +directory is mounted as a volume as well:: + + celeryworker: + volumes: + - ./data/music:/music:ro + - ./data/media:/app/funkwhale_api/media + #Â add your symlinked dirs here + - /media/nfsshare:/media/nfsshare:ro + + api: + volumes: + - ./data/music:/music:ro + - ./data/media:/app/funkwhale_api/media + #Â add your symlinked dirs here + - /media/nfsshare:/media/nfsshare:ro + + Album covers ^^^^^^^^^^^^