-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Consolidate configuration management into config plugin #1402
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
plugins/build-env/pre-build
Outdated
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.
Could the test fails be because of this^?
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.
Yep, thats it alright :(
|
@michaelshobbs what is the sed stuff here supposed to be doing? |
|
Figured out the issue and now everything is consolidated! |
|
That sed stuff reformats shell from https://docs.docker.com/reference/commandline/run/ |
|
Yeah, I figured it out and everything should be fine now :) |
|
I get why from a code perspective we would want to do this. However, I'm uncomfortable with how often we are calling dokku from within dokku. The more we do this the longer traces get and the hard it is to troubleshoot issues. This is obviously one of the shortcomings with bash. Just my opinion though. What if we had an |
|
The point of this is so that we can replace the config plugin with something else. If we just shove it into the common functions, that doesn't really help the matter. |
|
Why not put the function in the config plugin and that was other plugins can implement it? EDIT: My thinking is to optimize for core ease of use while giving the option of reimplementation to the plugin community. "Batteries included but replaceable" 😄 |
|
As in put it in a |
|
Yeah. I don't like the cross plugin sourcing bit, but again, we're doing this in bash....so....compromises? |
This should theoretically be safe, as "--export" forces the `dokku config` command to return 0 in all cases, and it should only output lines that are "valid" environment variables
d8b13a1 to
cddc4af
Compare
|
I think this is good to merge, @michaelshobbs ? |
docs/development/pluginhooks.md
Outdated
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.
update with config_export?
plugins/build-env/pre-build
Outdated
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.
Can we also allow access to this via a function instead of a full dokku execution?
plugins/00_dokku-standard/commands
Outdated
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.
I think you want this to be
trap 'rm -rf "$TMPFILE" > /dev/null' INT TERM EXIT
e5871d8 to
b01d371
Compare
This PR is an attempt at consolidating configuration retrieval and setting within the
configplugin. This would enable developers to replace theirconfigplugin with another plugin, one potentially backed by a database, and therefore would allow users to deploy a cluster of dokku instances backed by a single configuration database.--exportoption todokku config.eval(oooo evil) to set config env vars in the current context.Todo:
ENVfiles.dokku config:has ENV_VARmethod.ENVfiles for docker container runs.