Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rmetcalf9 opened this issue Jul 28, 2018 · 4 comments
Labels
Request Request for image modification or feature

Comments

@rmetcalf9
Copy link

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.

@wglambert wglambert added the Request Request for image modification or feature label Jul 30, 2018
@thenewguy
Copy link

Did you get this working?

@rmetcalf9
Copy link
Author

No I was not able to. I think it would be a nice feature to have in the main docker image though.

@thenewguy
Copy link

thenewguy commented Aug 20, 2018 via email

@yosifkit
Copy link
Member

yosifkit commented Mar 5, 2019

Sorry for the long delay. We'd rather keep the scripts and config in the image as minimal as possible. See also #202 (comment) and linked issues.

Since the introduction of the 3.7 image, you can supply /etc/rabbitmq/rabbitmq.conf and the entrypoint will only add/sed supplied envs while leaving other lines in the file untouched (#197 (comment)).

@yosifkit yosifkit closed this as completed Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Projects
None yet
Development

No branches or pull requests

4 participants