roribio / alpine-sqs

Dockerized ElasticMQ server + web UI over Alpine Linux for local development
GNU Affero General Public License v3.0
259 stars 56 forks source link

Need to be able to provide config files at startup. #11

Closed daniel-england closed 6 years ago

daniel-england commented 6 years ago

Need to have a way to use my config files on start up instead of editing them every time and restarting a service.

roribio commented 6 years ago

Hi,

Thank you for your interest :)

Could you please provide some more detail on what you're trying to accomplish?

Keep in mind that this project is only a convenience Docker implementation of the ElasticMQ project.

Thanks, Ronald

daniel-england commented 6 years ago

Hi Ronald,

The only way I could find to add queues is to add them manually. It would be nice if I could pass in the elasticmq.conf and sqs-insight.conf to use when launching the container.

note commented 6 years ago

@daniel-england I stumbled upon similar problem. According to README.md:

Alternatively, if you'd like to be able to edit configuration files locally, without having to enter the container, you can mount the configuration directory somewhere on your host directly.

docker run --name alpine-sqs -p 9324:9324 -p 9325:9325 -v /opt/alpine-sqs:/opt/config -d roribio16/alpine-sqs:latest

The problem is that it does not really work. The reason is that if I mount my directory to /opt/config on container it still gets overwritten by sqs-init.sh which does cp /opt/*.conf /opt/config/. One may think that it might work to mount to /opt instead but it does not. I don't know the semantics of mounting to already existing directories - in my case trying to do so wiped out all the existing content in container's opt which of course caused failure.

@roribio I prepared a PR that fixes that: https://github.com/roribio/alpine-sqs/pull/14

moleksyuk commented 6 years ago

Hi, @roribio Yep, the same issue for me. I would like to start ElasticMQ with already predefined 2 queues, not with only default one.

roribio commented 6 years ago

Thanks for contributing guys, great work! 😄