-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allow users to set additional configuration options #8
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
Conversation
…ly present in config file Allow setting configuration options to numeric and true/false values
Hey sorry for the delay on this. I'm not sure how I feel about this. On the one hand, we've set the precedent for some of this with several of our other environment variables, but on the other hand the ones we have are the bare minimum to actually have a working Wordpress installation. Also, since we don't overwrite the configuration file and we just rewrite it in place, it's technically something a user of the image can modify to their heart's content or supply a completely new version of. |
That's totally true. I coded this up and have ended up using it. Unclear whether it was ultimately a boon or not. If you guys want it, it's yours. If not, no hard feelings. |
Mind if we just leave it open for a while? That way people who are interested in such a thing can come try it out and leave feedback. I think our image is still too young right now to say for sure whether this would be a boon or a wart in the long run. 😄 |
not at all. however long you like. in the long run might be simpler to just write a custom config with getenv than all this sed madness anyhow. if you are pulling in versions by hand anyway it would be a pretty quick check to diff the new and old default configs to see if any changes might be required in the custom config. On Thu, Oct 23, 2014 at 1:37 PM, Tianon Gravi [email protected]
|
Some feedback after using this container to setup a WordPress Multisite: I think it’s nice to be able to modify the WP configuration using environment variables via something like this pull request. This way one can use docker-compose.yml to configure WP, which has some advantages for portability and keeping track of changes within a project. I see the point about keeping the configuration options to the minimum required by WordPress. On the other hand, since, for example, setting up multisite is a standard feature of WP, one could argue that being able to set that up would be one of those minimum required options. |
For the time being you can just mount your own config and put that in the
|
Thank you for the tip! that seems like it would be a good way for now. As I understand it, one can mount volumes but not individual files? Apologies as I'm not sure if this is a general docker question or if it could help someone with a similar issue when using this container. |
You can mount specific files. You would want to mount your wp-config file over On Tue, Sep 29, 2015 at 1:29 PM, Roman Bejnar [email protected]
|
I actually prefer being able to set everything via env vars instead of mounting config files into the image. That way, the configuration becomes even more unencumbered from OS specifics (e.g. on win you have to use absolute paths). I would very much like to see this implemented. |
I am for this PR. There's a lot of more constants that WP uses that isn't available in the |
+1 to seeing some action on this. At this point the most future proof solution seems to be extending the image and copying in a custom |
See #142 for a generic solution. |
Closing old issue; The generic solution has been merged in #142. |
These changes allow a user to set additional configuration options via environment variables. The CONFIG_OPTS array defines variables that can be set in this fashion.
To support this feature set_config has been modified to allow users to set config options to true, false and numeric values with proper (no) escaping. I've also added blank_config and del_config functions to facilitate configuration option setting.