Files
sf-sim/deployment/develop/rabbit/docker-entrypoint-wrapper.sh

13 lines
452 B
Bash
Raw Permalink Normal View History

2026-02-11 18:52:12 +01:00
#!/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 "$@"