Skip to content

Extending configuration generation #324

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
arteme opened this issue Mar 4, 2019 · 2 comments
Closed

Extending configuration generation #324

arteme opened this issue Mar 4, 2019 · 2 comments
Labels
Request Request for image modification or feature

Comments

@arteme
Copy link

arteme commented Mar 4, 2019

It would be nice to be able to extend the configuration file generation when extending from this docker image. It would be nice to be able to add custom logic at the end of the configuration file generation.

Something along the line of (shamelessly stolen from postgresql docker container) this in docker-entrypoint.sh:

if [ "$1" = 'rabbitmq-server' ] && [ "$shouldWriteConfig" ]; then
                    # ....current logic....

                    echo
                    for f in /docker-entrypoint-initdb.d/*; do
                        case "$f" in
                                *.sh)
                                          echo "$0: sourcing $f"
                                          . "$f"
                                          ;;
                                *)        echo "$0: ignoring $f" ;;
                        esac
                        echo
                    done
fi
@wglambert wglambert added the Request Request for image modification or feature label Mar 4, 2019
@yosifkit
Copy link
Member

yosifkit commented Mar 5, 2019

Duplicate of #53, see the final comment.

I'd also say this is similar to #202 and similar issues. Especially this #202 (comment):

Especially with 3.7's simpler config format, we'd rather move to doing less config via the entrypoint. Since it will be simpler for a user to supply their own config file and then the entrypoint can sed their file to update/add a limited set of specific values rather than being responsible for every option possible in a rabbit config.

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
@arteme
Copy link
Author

arteme commented Mar 5, 2019

Thank you, this is indeed enough for my use-case. The fact that rabbitmq.conf is appended escaped my attention when reading the entry-point script.

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

3 participants