-
Notifications
You must be signed in to change notification settings - Fork 55
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 environment vars cli flag to stack init #303
Add environment vars cli flag to stack init #303
Conversation
9b112ab
to
5026180
Compare
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.
Thanks for the contribution @rodion-lim-partior, I like were this is going!
I'm wondering if you have tested the behaviour when using the docker-composer.override.yml
and overriding the environment variables for a specific container and how that would impact the environment variables set here. I also only see the value of this feature for things such as making all the containers use a PROXY, or networking setup? Most of the time users will want to customise specific environment variables for each service and the docker-compose.override.yml
is probably the best solution.
@EnriqueL8, I tested locally with the docker compose overrides. docker compose have precedence over CLI options overrides, which is what we expect. Also, the docker compose overrides do not wipe CLI options, it merges the difference in. This are the EnvironmentVars that we pass into the CLI options
This is the docker compose overrides used:
In geth_0 container:
In geth_1 container:
Also, you are right that in our use case, the value of this feature is for things such as making all the containers point to the same proxy variables. |
5026180
to
ae7f806
Compare
Signed-off-by: rodion <[email protected]>
Signed-off-by: rodion <[email protected]>
ae7f806
to
6c69867
Compare
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'm happy with this one going in
This PR adds a
--environment-vars
flag to the init command to allow docker compose generation to include generic environment variables across all containers. When docker is started against a corporate proxy, containers are unable to resolve via the internal DNS names due to the proxy.In this instance, users need to unset the proxy by passing in environment variables
HTTP_PROXY=,http_proxy=
to the containers. Depending on needs, other proxy specific environment variables can be set as well.Resolves #302