You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, the only way to ignore an environment variable within dip is to add it to the DIP_EARLY_ENV environment variable. This is a reasonable heuristic for what to ignore, but it means that there is an order-dependence to your shell configuration.
What I found is that since I use chruby, which modifies the GEM_HOME and GEM_PATH environment variables, my dip-run containers were not picking up the bundle in my Docker volume and were thus not working.
The reason for that is that my eval "$(dip console)" was being run prior to chruby initializing.
It would be really nice if dip had the ability to allowlist/denylist environment variables to use within the containers. Something like:
I'd be happy to take a crack at an approach if you want.
Aside
I'm not really sure what the current behavior is meant for since docker-compose already handles the environment variables that I need within my project. Why do you pass all environment variables in, instead of relying on docker-compose to manage the environment for you?
The text was updated successfully, but these errors were encountered:
The main goal is to do not think about all environment variables that may appear in a project, e.g. VERSION=20200421 rails db:migrate:down and many others.
eval "$(dip console)" was being run prior to chruby initializing
I think the workaround is to move chruby under dip in your bashrc.
It would be really nice if dip had the ability to allowlist/denylist environment variables
I need some time to think about what can I do with that.
As far as I can tell, the only way to ignore an environment variable within dip is to add it to the
DIP_EARLY_ENV
environment variable. This is a reasonable heuristic for what to ignore, but it means that there is an order-dependence to your shell configuration.What I found is that since I use chruby, which modifies the
GEM_HOME
andGEM_PATH
environment variables, mydip
-run containers were not picking up the bundle in my Docker volume and were thus not working.The reason for that is that my
eval "$(dip console)"
was being run prior to chruby initializing.It would be really nice if
dip
had the ability to allowlist/denylist environment variables to use within the containers. Something like:or
I'd be happy to take a crack at an approach if you want.
Aside
I'm not really sure what the current behavior is meant for since
docker-compose
already handles the environment variables that I need within my project. Why do you pass all environment variables in, instead of relying ondocker-compose
to manage the environment for you?The text was updated successfully, but these errors were encountered: