Newer
Older
#!/bin/sh
# Create a user for rabbitmq
( rabbitmqctl wait --timeout 60 $RABBITMQ_PID_FILE ; \
rabbitmqctl add_user $RABOTNIK_MESSAGE_BUS_USER $RABOTNIK_MESSAGE_BUS_PASSWORD 2>/dev/null ; \
rabbitmqctl set_user_tags $RABOTNIK_MESSAGE_BUS_USER administrator ; \
rabbitmqctl set_permissions -p / $RABOTNIK_MESSAGE_BUS_USER ".*" ".*" ".*" ; \
echo "*** User '$RABOTNIK_MESSAGE_BUS_USER' with password '$RABOTNIK_MESSAGE_BUS_PASSWORD' completed. ***" ; \
echo "*** Log in the WebUI at port 15672 (example: http://localhost:15672) ***") &
rabbitmq-plugins enable rabbitmq_mqtt
# $@ is used to pass arguments to the rabbitmq-server command.
# For example if you use it like this: docker run -d rabbitmq arg1 arg2,
# it will be as you run in the container rabbitmq-server arg1 arg2
# shellcheck disable=SC2068