-
Notifications
You must be signed in to change notification settings - Fork 224
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 depends_on rabbitmq to docker compose file #74
Comments
Can you please give me the updated compose file ? |
In theory, I have not tested. https://docs.docker.com/compose/startup-order/ https://docs.docker.com/compose/compose-file/#upgrading Posible solution 1
run with: Posible solution 2
run with: Now the problem is: My test are with: It's only a first idea to try. Increase the sleep of open-ocr-worker and replace links tag by depends_on tag on docker-compose.yml and run with: Regards |
@wicope what about this? https://gist.github.com/tleyden/35a75b365fcb7afb59a1f59eb7cafd2e Note the "dependency chain" where openocr depends on rabbitmq, and everything else depends on openocr. (also, wrapper scripts with sleeps removed) |
That didn't work for me
|
I upgraded docker-compose, same error
|
Switched to https://gist.github.com/tleyden/872475942bf7e70ce34e6f39f1b388db since
|
docker-compose has two version of file.yml when you put in file.yml version tag and services tag like:
then you are using version 2 of docker-compose. For use version 1 of docker-compose you not must have version tag and services tag like:
For version 1 of docker-compose you have links tag and not depends_on tag. https://docs.docker.com/compose/compose-file/#upgrading
I think that depends_on tag launches first the container of dependence and later the container is released. The problem of depends_on is that no does not wait for the service is initialized. For resolve this there are some ways on https://docs.docker.com/compose/startup-order/ Regards |
Thanks, I tried v2 https://gist.github.com/tleyden/b39bc392e2beade385b978c4c9f712b1 Same error. |
Hi Same error? It's because you use links with version 2 of docker-compose.yml https://docs.docker.com/compose/link-env-deprecated/ For version 1 of docker-compose you have links tag (not depends_on tag)
For version 2 of docker-compose you have depends_on tag (not links tag)
Regards |
Ok, sorry I skimmed that. Ok I will retest with v2 + depends_on |
@wicope changed to use depends_on, still not working .. https://gist.github.com/tleyden/5d86581fe4293248aebee52705fb9ee1 I think this will need to use https://github.com/vishnubob/wait-for-it or dockerize as mentioned in the docs you posted. Thanks! |
Yes you see the error: Please can test: I think that depends_on tag launches first the container of dependence and later the container is released. The problem of depends_on is that no does not wait for the service is initialized. For resolve this there are some ways on https://docs.docker.com/compose/startup-order/ Choose:
Regards |
Yeah, agreed |
Kinda defeats a lot of the purpose of compose, but thanks for posting the workaround! |
great!!.. I was able to build it on my windows machine now.. thanks for your help!!!.. |
Had same error; changes that I had to do - moved Gist: https://gist.github.com/kampta/a43413b64a1696b26673eca9ef8d640b |
@kampta thanks for the contribution! |
i added a sleep in the command because i could not get it to run in any other way - yes workarround but works for me https://gist.github.com/matzschmanski/4c96d48b2240dc90ee520d17c4bf8ba6 |
Looks like this was fixed and merged: https://github.com/tleyden/open-ocr/blob/master/docker-compose/docker-compose.yml#L31 |
As mentioned in #66 (comment), the docker compose file needs:
after that, the changes from https://github.com/tleyden/open-ocr/pull/65/files will work.
The text was updated successfully, but these errors were encountered: