I have a GraphQL container, hitting an Elasticsearch container. Now, in the compose file I have:
depends_on:
- elasticsearch
but the thing is, the elasticsearch server (being a JVM process) takes time to come up. However, as far as docker is concerned it appears that this makes no difference, so compose then moves on the the GraphQL container...even though the ES is not ready. So, if a user hits the site before the ES is ready the graphql bugs out and crashes..
So, is there a way to signal to dependent containers to check a process is up, maybe first? Or must this be done in the GraphQL code...