13 lines
452 B
Bash
Executable File
13 lines
452 B
Bash
Executable File
#!/bin/bash
|
|
set -eu
|
|
|
|
# Substitute env vars into definitions template before RabbitMQ starts.
|
|
# RabbitMQ 4.x skips default user creation when definitions.json is loaded,
|
|
# so the user must be defined in the JSON itself.
|
|
sed \
|
|
-e "s|RABBITMQ_USER_PLACEHOLDER|${RABBITMQ_USER}|g" \
|
|
-e "s|RABBITMQ_PASSWORD_PLACEHOLDER|${RABBITMQ_PASSWORD}|g" \
|
|
/etc/rabbitmq/definitions.template.json > /etc/rabbitmq/definitions.json
|
|
|
|
exec docker-entrypoint.sh "$@"
|