[BUG] rabbitmq creates a new directory after each docker-compose up and leaves the old one
Describe the bug
We went through the installation guide and made changes to latest stable docker-compose.yml. We observed new folders rabbitmq@randomstring in /var/lib/docker/volumes/taiga-docker_taiga-async-rabbitmq-data and /var/lib/docker/volumes/taiga-docker_taiga-events-rabbitmq-data (>300 MB each) after every docker-compose up. According https://github.com/docker-library/rabbitmq/issues/391 rabbitmq uses the hostname as part of the folder name, like rabbitmq@[hostname]. I suspect, without giving a hostname, rabbitmq creates a new directory with a random string, but the older ones are no longer needed.
How can we reproduce the behavior
- make changes to docker-compose.yml
- run docker-compose up -d
- run docker-compose down
- repeat everything and observe the docker volumes
taiga-docker_taiga-async-rabbitmq-dataandtaiga-docker_taiga-events-rabbitmq-data
Workarounds After setting a hostname in taiga-async-rabbitmq and taiga-events-rabbitmq, rabbitmq uses always the same directory without creating new ones.
taiga-async:
image: taigaio/taiga-back:latest
hostname: "taiga-async-rabbitmq"
volumes:
- taiga-async-rabbitmq-data:/var/lib/rabbitmq
[..]
taiga-events-rabbitmq:
image: rabbitmq:3.8-management-alpine
hostname: "taiga-events-rabbitmq"
volumes:
- taiga-events-rabbitmq-data:/var/lib/rabbitmq
Taiga environment Self-hosted latest stable taiga-docker
I can confirm this for the docker images tagged latest.
Yeah I am seeing this and was scratching my head about losing data on restart.
two years later and it saved my night... tkssss