-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* disable loopback user for rabbitmq * minor change * minor update * minor change * clean up and added rabbitmq conf file * minor change * update back * minor change * added entrypoint script for setting rabbitmq conf file * minor change' * Automated commit: Unpin versions of updated images * use entrypoint.sh file * entrypoint.sh changes * minor change * clean up * rollback minor changes * limit free disk space to 10gb --------- Co-authored-by: VRO Machine User <[email protected]>
- Loading branch information
1 parent
7e7a504
commit 451be65
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
# Use the Bitnami RabbitMQ image as the base | ||
FROM bitnami/rabbitmq:3.12 | ||
|
||
COPY rabbitmq.conf /tmp/rabbitmq.conf | ||
|
||
USER root | ||
|
||
RUN chown 1001 /tmp/rabbitmq.conf \ | ||
&& chmod g+w /tmp/rabbitmq.conf | ||
|
||
USER 1001 | ||
|
||
## Copy the entrypoint script | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Check if RABBITMQ_USERNAME or RABBITMQ_USER is set and assign it to a variable | ||
if [ ! -z "$RABBITMQ_USERNAME" ]; then | ||
RABBITMQ_USER_VALUE="$RABBITMQ_USERNAME" | ||
elif [ ! -z "$RABBITMQ_USER" ]; then | ||
RABBITMQ_USER_VALUE="$RABBITMQ_USER" | ||
else | ||
echo "Neither RABBITMQ_USERNAME nor RABBITMQ_USER is set. Exiting." | ||
exit 1 | ||
fi | ||
|
||
# Define the path to your configuration file | ||
CONFIG_FILE="/tmp/rabbitmq.conf" | ||
|
||
# Replace lines in the config file | ||
sed -i "s/^default_user .*/default_user = $RABBITMQ_USER_VALUE/" $CONFIG_FILE | ||
sed -i "s/^default_pass .*/default_pass = ${RABBITMQ_PASSWORD}/" $CONFIG_FILE | ||
|
||
|
||
cp /tmp/rabbitmq.conf /etc/rabbitmq/rabbitmq.conf | ||
|
||
exec /opt/bitnami/scripts/rabbitmq/entrypoint.sh /opt/bitnami/scripts/rabbitmq/run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## Clustering | ||
cluster_partition_handling = ignore | ||
|
||
## Defaults | ||
# During the first start, RabbitMQ will create a vhost and a user | ||
# These config items control what gets created | ||
default_permissions.configure = .* | ||
default_permissions.read = .* | ||
default_permissions.write = .* | ||
log.console = true | ||
default_vhost = / | ||
default_user = guest | ||
default_pass = guest | ||
|
||
## Networking | ||
listeners.tcp.default = 5672 | ||
|
||
## Management | ||
management.tcp.ip = 0.0.0.0 | ||
management.tcp.port = 15672 | ||
loopback_users.user = false | ||
|
||
## Resource limits | ||
# Set a free disk space limit relative to total available RAM | ||
disk_free_limit.absolute = 10GB |