-
Notifications
You must be signed in to change notification settings - Fork 224
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
Fix passing of database credentials to containers. #366
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
So I've tested it and even though the environments are now available as required, there's one environment variable that is missing: The only way I can get that variable set in a "quick" way by entering the container with
for a dirty workaround to get rid of the second step. However: The disadvantage on this approach clearly is that you always have to call Directly calling Docker by default uses A very dirty workaround I found on stackoverflow was to overwrite |
@MrGeneration thanks a lot for the testing. I'm aware of this limitation. That's why I suggested to use Alternatively, We'd have to make sure this is clearly documented. What do you think? |
My versions are
I dug deeper and noticed that the With this the entrypoint variant with exec also works as expected:
Sorry for the confusion on my end here.
Definitely should be documented. It's not straight forward. We also could implement some kind of wrapper like we have in package installations Btw I also build a local container to test my |
oh! A big thanks, now its works for me. I'm a new Zammad User, great Work. |
The current state has serious issues. Database env vars from
.env
don't get passed to the containers, and thus it will only work if the defaults are used - they are also assumed bydocker-entrypoint.sh
. If you attempt to change database username, host etc. it will fail to even install Zammad.This update corrects that and makes sure all containers that potentially execute Zammad / Rails code get all required variables. With this, commands can be executed like:
docker-compose run --rm zammad-railsserver rails r 'pp Setting.count'
.