-
Notifications
You must be signed in to change notification settings - Fork 45
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 automatic detection of docker-compose files for trigger #553
Comments
I like the idea. but it would also need to re-work the docker compose triggers currently you need then if you want manual or any other options you need WUD_TRIGGER_DOCKERCOMPOSE_{trigger_name}_AUTO since afaik you would need an AUTO=false for each trigger name to if you wanted to manually kick of the trigger. and i guess one for each container in the compose file? i definatly dont want my postgres to update accidently if i messed up the reg somehow in the future (i havent played with it since I'm not a fan of auto updates and been waiting for the manual trigger process and i haven't had time yet since it's been released) and one for each other option you might want to use. So feels like some sort automatic trigger name generation for compose types, would be needed to associate the various trigger options with for the container. sometimes I think the trigger system would benefit from a config interface. Create Trigger select type. select function. assign containers. and allow one of each type to be set as default as well. but easier said than done and I digress :P but short term maybe you can use this should work aside from formatting
of course I could be completely overthinking it |
While that approach would certainly work, I would have to add an trigger include label for every container to not have every trigger be available for every container. A native implementation would be a much cleaner solution |
I currently have 70+ containers running and I really don't want to create a seperate docker-compose trigger for each of them.
A way to have WUD automatically detect the docker-compose file for a container based on the container labels would be really nice to have.
My folder structure currently looks something like this:
Since every container created with
docker compose up
should have thecom.docker.compose.project
label which contains the folder name (in lowercase) where the docker-compose.yml is located, you could mount the folder containing all your subfolders (docker
in my case), and tell WUD to lookup the docker-compose files by itself.When the docker-compose trigger is executed, WUD looks up the compose file location with the container label, and checks if a corresponding folder exists in the mounted folder. If it exists, the docker-compose.yml inside is checked if it actually contains the image from the container (just to make sure there are no false positives and the wrong file gets updated), and is then updated with the already existing methods.
The text was updated successfully, but these errors were encountered: