-
Notifications
You must be signed in to change notification settings - Fork 186
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
Scheduler not discovering docker-compose container based on labels #78
Comments
Hey, problem is that So in your case, to fix your docker-compose, you need to change the dependencies. So now, your But yes, this is the missing feature that will need to be implemented. |
Hi @trane9991 That swapping around the dependencies you suggested is actually the first thing I thought of and the first thing I tried when I was debugging this yesterday. It didn't make any difference and the same problem occurred. However just now after seeing your response, I created a new docker-compose file with the dependencies swapped around, now it does work as expected. So that was the problem. Thanks for your help. |
In regard to how to implement a feature to fix this, I think the only way to do it would be to somehow have a notification from the docker daemon to alert ofelia when a new container has started on the host, then ofelia can check if it has the right labels, and can register a new scheduled task. That sounds like its easy on the surface, but likely hard to properly implement. |
@ashleysommer most likely |
Just need watch docker events https://docs.docker.com/engine/reference/commandline/events/ This is difficult for me, maybe you can figure it out? @trane9991 |
This becomes a showstopper for me, because I use some docker-compose files and even if I use one only, it's required to check if other containers are running or have a big list in 'depends on'. |
Fixed here: #137 |
Here's my minimal reproduction of the docker-compose file:
Here is the output:
As you can see, the scheduler only registers the one job-local configuration, it does not discover the one from my second container.
I've based the config on the docker-compose file I saw in this issue: #76, on that page in the text I see it seems to work fine, the output in the text in that issue shows two jobs registered.
Using:
Docker 18.09.7
Docker-compose 1.23.2
Ofelia: latest pull from dockerhub.
I'm hoping there's something simple and obvious I'm doing wrong. Is there any kind of additional debugging output I can use to check why its not working?
The text was updated successfully, but these errors were encountered: