So, I've added a container to my setup, to run the inplace import constantly, which already is working great. Though I have two questions regarding the container I defined in docker-compose for this.
So the container looks like this:
importer:
restart: always
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
env_file: .env
depends_on:
- postgres
- redis
volumes:
- ${MUSIC_DIRECTORY_SERVE_PATH}:${MUSIC_DIRECTORY_PATH}:ro
- media:${MEDIA_ROOT}
networks:
- funkwhale
command: python manage.py import_files ${LIBRARY_ID} "${MUSIC_DIRECTORY_PATH}" --recursive --noinput --in-place --prune --watch
Now this works, but I'd like to see if I can optimize certain parts of it, since I mostly copied the api-container and adapted it.
- I'm guessing this container doesn't really need to depend on redis, so the dependency could be removed (though it also shouldn't matter too much), correct?
- Does the import use the media-directory at any point? I'm unsure about that, but assumed it could be used to store the covers? Or is the volume there unnecessary?
- Would
--replace
add any additional functionality to the command? I sometimes replace files I have laying around as mp3/ogg with flacs, but in those cases I usually delete the file first and add the new one and watch should deal with something like that by itself, right? Though I guess it couldn't hurt, just in case I add multiple versions of a track or some reason?
- Regarding the library-id: At the moment I hard-coded it into the command. I dislike that, cause it's something that wouldn't work on a fresh install (I'd need to set funkwhale up, then copy the library-id into the config). Is there a way to configure a default library-id into funkwhale, for the main library?