-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Use depends_on dependency container #78
Conversation
Oh this looks really nice !! Did you try it? Are you sure that the kibana service will be able to detect that the elasticsearch is ready to listen on port 9200 ? As stated in docker-compose docs: https://docs.docker.com/compose/compose-file/#/dependson
Maybe Kibana 5 now have a better support to re-establish connections to elasticsearch though... I need to try this :) |
@deviantony @nathaliaortegaGL I'm currently using |
@deviantony yes, I tried it and it works fine! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey ! Thanks again for the PR and sorry for my late review.
I just tested it, it works perfectly well ! It seems that Elastic managed to make logstash/kibana try to reconnect on the elasticsearch instance insteadd of shutting down.
As said in the comments, the script kibana/entrypoint.sh
is now useless. We'll keep the kibana/Dockerfile
with only the base image import as it may be used later to extend it easily.
I've also tested without the depends_on
directives and it works too ! But we'll keep them as it make things clearer about the dependencies of the stack.
@@ -1,7 +1,5 @@ | |||
FROM kibana:5 | |||
|
|||
RUN apt-get update && apt-get install -y netcat bzip2 | |||
|
|||
COPY entrypoint.sh /tmp/entrypoint.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also remove the lines 3-4 which are used to copy the entrypoint.sh
script. This script has no purposes anymore, so please delete it too. We'll keep the kibana/Dockerfile
with only the FROM
directive.
@@ -1,10 +1,4 @@ | |||
#!/usr/bin/env bash | |||
|
|||
# Wait for the Elasticsearch container to be ready before starting Kibana. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As said previously, delete the file kibana/entrypoint.sh
.
ping @nathaliaortegaGL |
depends_on will (1.10) eventually use HEALTHCHECK to determine if it's actually ready, which is nice, but any "it works in correct order" here is chance. |
Yeap, this is indeed a good PR. Another ping @nathaliaortegaGL ? |
I just ping @nathaliaortegaGL internally to update her PR. |
@deviantony changes have been applied! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last update required.
|
||
COPY entrypoint.sh /tmp/entrypoint.sh | ||
RUN chmod +x /tmp/entrypoint.sh | ||
|
||
CMD ["/tmp/entrypoint.sh"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to remove this line, otherwise it won't work.
@nathaliaortegaGL one more thing needs to be updated. |
@deviantony Sorry, forgot to delete that :) It's ready now. |
Thanks @nathaliaortegaGL :) |
add depends_on to kibana and logstash on docker-compose.yml to prevent having to install NC and not have to keep checking for ES to start as the container will start after.