From Telegram
The Wikibase docker-compose.yml does not have a volume for the Elasticsearch index, meaning the index needs to be rebuild whenever the container is rebuild. Is there a reason for that or is this an oversight? I saw this question raised a few months ago elsewhere and am not aware of a good answer.
This is indeed an oversight and not something that should be happening.
A volume should be specified for this service