Skip to content

Alter docker-entrypoint.sh to accept environment variable for management.path_prefix #269

Closed
@rmetcalf9

Description

@rmetcalf9

Hi,
In my use case for this image I need the container to run with a different path_prefix.
My current solution to this is to:
Start the container
Get a terminal to it
write the following command:

echo "management.path_prefix = /rabbitmqmanagement" >> /etc/rabbitmq/rabbitmq.conf

restart the management plugin

I would rather not have to follow this process.
This is the compose file I am using:

version: "3.1"

secrets:
  rabbitmq_default_pass:
    external: true

services:
  dockjob:
    image: rabbitmq:3.7.7-management
    ports:
      - 5671:5671
      - 5672:5672
      - 15671:15671
      - 15672:15672
    environment:
       - RABBITMQ_DEFAULT_USER=admin
       - RABBITMQ_DEFAULT_PASS_FILE=/run/secrets/rabbitmq_default_pass
       #- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=--path-prefix /rabbitmqmanagement  Can't get this working
    secrets:
     - rabbitmq_default_pass

(I am working up to adding SSL config to it)

I can see docker-entrypoint.sh already adds lots of management config based on enviroment vars. It should be easy to make it add the path_prefix one as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions