Skip to content

Commit 1e51d55

Browse files
committed
chore: Add saving rabbit data in the named docker volume.
1 parent 6b16606 commit 1e51d55

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docker/docker-compose-dev.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
version: '3.9'
22

3+
volumes:
4+
rabbit-data:
5+
driver: local
6+
37
services:
48
rabbit:
59
image: rabbitmq:3-management #you may open management UI via http://localhost:15672/#/ login&password == guest
610
container_name: rabbit
11+
#hostname required here to work with the volume on persistent queues.
12+
#Rabbit saves data by folders whose names are generated from the host. To have data restored on container restart we need to commit the host.
13+
hostname: rabbit
14+
volumes:
15+
- rabbit-data:/var/lib/rabbitmq
716
ports:
817
- "5672:5672"
918
- "15672:15672"

0 commit comments

Comments
 (0)