-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add more environment variables #42
Comments
Check #39 for a possible solution, please. |
@TimWolla, please integrate configuration variables into |
Configuration variables that allow for plugin auto-configuration. |
@realies You can load your custom plugin configuration using a bind-mounted file to A more detailed explanation is given in the README: https://github.com/docker-library/docs/tree/master/adminer#loading-plugins |
Would be nice if the official plugins are supported by the official Docker image in an automated way. |
@realies What is the difference between some kind of environment variable you would need to configure manually and a file that you would need to configure manually? The Docker image even gives you a template to fill out. Other than that I'm not even sure how a good interface using environment variables would look. Hardcoding everything for the official plugins is a non-starter for consistency reasons. Also in most cases you would need to provide arrays which are painful to provide, as you would need to encode the array structure within a flat environment variable. |
@TimWolla I understand that this discussion went into the direction on plugin configuration although the original question is very broad. I'd like to pick on the original broader question. Let me know if you rather like to discuss that in a separate issue. With I already have it working locally and can provide a PR. We could then continue the discussion there. What do you think? |
@TimWolla What about environment variables to set upload_max_filesize, post_max_size, etc. I ended up creating my own build based on yours except with modified PHP values. |
@walkafwalka See #49 + linked issues. |
@TimWolla Fair enough. I agree that users are always going to want one more configuration to configure. Though, it does feel like a tease to see that five configurations have their defaults modified. I think the same reason you chose to change these defaults align with the same reasons that these configurations should be configurable by the user via an environment variable. I am not arguing for the "one more" configuration but instead for allowing the current additional configurations to not be set in stone. |
My answer here would be identical to this one here, so just linking: #36 (comment)
They are not set in stone. There's about a thousand different ways for you to modify them. And if someone brings forward a good argument for further modification of the defaults I'm happy to include it. As an example |
👋 I have a similar question to the original poster - we are using Adminer with The phpMyAdmin Docker image solves this very elegantly using env vars, why can't Adminer do the same? |
@khromov I disagree. See also this issue for a related discussion: #52 (comment) (especially the last comment).
One reason is that phpMyAdmin natively supports a configuration file to configure the login. Adminer does not without using plugins. Different software, different features, different use cases. Adminer aims to be simple and lightweight. phpMyAdmin is more comfortable and full-featured. |
Solution provided here wasn't working for some reason so I used other hook to prefill login form. Otherwise the process is the same as kindly explained by the maintainer of this repository. Dockerfile with build stages to prevent this plugin from ever making it's way to production.
Form prefill plugin from /enabled-home/ folder *** edit: Updated with suggested fixes *** edited again ** to fix own stupid brainfart
|
@pintoflager Thank you for sharing your solution. I appreciate it. I've reviewed it from a PHP perspective:
|
Good catches and valid points. Updated to 42 |
looking forward to this solution |
Any chance this could be merged / released? |
It does seem odd that you can change the default host via an environment variable, but cannot set the connection type the same way. (At the very least! The username and password would also be super convenient to set defaults for, specifically for development with docker-compose setups.) |
Exactly my needs, found an image that helps me with those variables: |
Is it possible to set system and maybe also database using environment?
Defining server is very useful, but I use Postgres and it always defaults to MySQL.
The text was updated successfully, but these errors were encountered: