-
Notifications
You must be signed in to change notification settings - Fork 50
Change environment variable OC_CONFIG_DIR due to overlap #177
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
Changed environment variable name from OC_CONFIG_DIR to OC_CONF_DIR due to dual use of the same variable name causing issues in edge cases (per #1279 @ opencloud-eu/opencloud#1279)
|
your issue can be controlled without making this breaking change. you shouldn't be passing |
|
sorry, I think you are misunderstanding here - the docs state to use a variable named OC_CONFIG_DIR inside the Docker compose file. very happy for this to be solved another way, but the simplest seems to be 'name the variable something else in the Docker Compose file examples and docs' |
|
hm, i don't think i misunderstood. OC_CONFIG_DIR is only used for substitution in compose. you're facing issues because you are passing the env into the container and that messes with the oc runtime. in your compose file, you did this you should look at specifying the required envs explicitly instead of sending the whole env in. this compose repo does just that and that's why it doesn't have any issues |
|
then i suggest you read this, the docs I am referring to: |
|
you answered it yourself here ;D not sure what more needs to be said.
the env var works in this repo and nothing needs to be fixed. you are on your own if you choose to write your own compose file as you have shown to have done here, changing the variable name (when nothing is broken btw) will most definitely affect everyone who has set it to point to a custom directory. there is nothing to fix in this repo, everything is working if you follow the instructions from the readme carefully. |
|
Yea, there is even an example, where it makes clear it's on the host The only mistake is here, where it is called |
Please do not mix docker compose and product env vars. The dev docs are correct. They are referring to the path variable inside the container. |
which is the point I am trying to make - the same variable name is used in the example docker compose file and inside of the container, for different purposes. The overlap of variable names causes issues - intent of PR is to have one variable name (OC_CONF_DIR) for the Docker Compose file, and another (OC_CONFIG_DIR, left as is) for the product inside the container |
|
Ok I get it, but maybe |
Sure, if that's simpler/makes more sense? Very open to edits/changes/alternate/better solutions. Don't know that it's a breaking change though? I would guess that anyone already deployed will have had to use a workaround/customise the compose/variables to get it working in the current form, with the internal/external variables having the same name, ends up functioning like this: without it actually being present in the Docker compose file (meaning bind mounts likely wouldn't work as expected?). To trace my thinking on that, here it takes that variable (if present) and uses it instead of |
Having another look at your PR, we have the same 'issue' but looking from different angles - perhaps a another/better(?) target for this fix would be all references to |
this. period. not sure why the author is so dead insistent that it's a docs issue and not his own. I even gave him a fix and he refuses to take it. |
the docs i linked you say: the example of my 'custom file' (cloned and unchanged from this repo at the time that issue was raised in July) you linked is doing exactly that. |
Changed environment variable name from OC_CONFIG_DIR to OC_CONF_DIR due to dual use of the same variable name causing issues in edge cases (per #1279 @ opencloud-eu/opencloud#1279)
PR to docs as well @ opencloud-eu/docs#547