https://github.com/bvis/docker-rabbitmq
Extends the official Docker RabbitMQ image and adds the possibility to execute shell scripts when launching the container.
https://github.com/bvis/docker-rabbitmq
Last synced: about 1 year ago
JSON representation
Extends the official Docker RabbitMQ image and adds the possibility to execute shell scripts when launching the container.
- Host: GitHub
- URL: https://github.com/bvis/docker-rabbitmq
- Owner: bvis
- License: apache-2.0
- Created: 2016-03-10T17:25:11.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-07-10T12:48:28.000Z (almost 8 years ago)
- Last Synced: 2025-02-14T05:29:51.994Z (over 1 year ago)
- Language: Shell
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# basi/rabbitmq
It extends the official Docker RabitMQ image and adds the possibility of execute shell scripts when launching a container.
It's useful to initialize vhosts, permissions, etc.
For test the automatic registration of the vhosts and other configurations, assuming you have ".sh" scripts in the _./setup_ directory:
```
$ cat setup/notifications_bus.sh
#!/bin/bash
rabbitmqctl add_user MYUSER MYPASS \
&& rabbitmqctl add_vhost MYVHOST \
&& rabbitmqctl set_permissions -p MYVHOST MYUSER ".*" ".*" ".*"
```
It creates a new vhost named "MYVHOST" and a user named "MYUSER" that will have all the permissions on the vhost.
It will we executed once the rabbit service is running:
```
$ docker run --rm --name rabbit-test -v $PWD/setup:/docker-entrypoint-initrabbitmq.d/ basi/rabbitmq:latest
```
It provides a self healthcheck system.