-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature Request: Global Override #40
Comments
So you would want a wildcard replaced by the same string in all places? Other than the service name, couldn't you just use global environment variables? |
It goes a little further... let's say you have 20 compose files without the labels at all, you would first have to edit all the files and services in them to get the labels before you could change them with a global environment. As I understand the override can merge compose files a the start of Let's say the potential global override has this content:
And a compose file has this content:
So basically while the compose file is started up, it would apply the override to start this configuration and merge them:
Not sure if this can be done with the global.env without altering the compose file before it can read the variable, and apply even the section Thanks for reading my request and best regards |
It can't be done with global.env without adding to existing compose files. But this isn't really an override. It is an intelligent merge. Not only would it have to enumerate the services in your example but it would have to determine if elements were already there. And that is just this example. If someone wanted to do an intelligent merge with volumes or ports or something else, this could be a really complicated change. Right now, the plugin is just doing a simple search and replace of one string (CHANGE_TO_COMPOSE_DATA_PATH) at the time saltstack is writing the compose file to disk. If you and/or someone else wants to come up with the code, I would think about adding it. I am just too busy with non-OMV projects right now to even look into this one more. |
Do you think this is possible to achieve with salt and jinja? |
jinja is doing the work now - https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-compose/blob/main/srv/salt/omv/deploy/compose/files/compose_yml.j2 I guess it would just depend on how many cases it covered. |
Hi,
I would really love to see a possibility to give all my compose files a value, e.g. a label for
whats-up-docker,
or set my restart policy without needing to edit it for each container every time.Something like this:
I'm aware this could be a little bit tricky, since the serivce name can be or is individual for each container. Maybe a wildcard could be used, e.g.:
This wildcard would open so much possibilties:
This could be the game changer for the overwrite feature :-)
Regards
The text was updated successfully, but these errors were encountered: