Skip to content

Commit 05530e4

Browse files
committed
Delete our default "rabbitmq.config" file so that the entrypoint knows to generate it if a custom one is not supplied (with or without other configuration via environment variables)
1 parent 1fb8940 commit 05530e4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5959
# /usr/sbin/rabbitmq-server has some irritating behavior, and only exists to "su - rabbitmq /usr/lib/rabbitmq/bin/rabbitmq-server ..."
6060
ENV PATH /usr/lib/rabbitmq/bin:$PATH
6161

62-
RUN echo '[ { rabbit, [ { loopback_users, [ ] } ] } ].' > /etc/rabbitmq/rabbitmq.config
63-
6462
# set home so that any `--user` knows where to put the erlang cookie
6563
ENV HOME /var/lib/rabbitmq
6664

docker-entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,12 @@ rabbit_env_config() {
209209
join $'\n' "${ret[@]}"
210210
}
211211

212-
if [ "$1" = 'rabbitmq-server' ] && [ "$haveConfig" ]; then
212+
shouldWriteConfig="$haveConfig"
213+
if [ ! -f /etc/rabbitmq/rabbitmq.config ]; then
214+
shouldWriteConfig=1
215+
fi
216+
217+
if [ "$1" = 'rabbitmq-server' ] && [ "$shouldWriteConfig" ]; then
213218
fullConfig=()
214219

215220
rabbitConfig=(

0 commit comments

Comments
 (0)