diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..deebbc02 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docker/wait-for-it/wait-for-it"] + path = docker/wait-for-it/wait-for-it + url = https://github.com/vishnubob/wait-for-it.git diff --git a/docker-compose.accounts.yml b/docker-compose.accounts.yml index 2f000764..a9bca9e3 100644 --- a/docker-compose.accounts.yml +++ b/docker-compose.accounts.yml @@ -70,7 +70,7 @@ services: kratos-migrate: image: oryd/kratos:v0.5.5-alpha.1 container_name: kratos-migrate - restart: "no" + restart: off logging: *default-logging environment: - DSN=cockroach://root@cockroach:26257/defaultdb?max_conns=20&max_idle_conns=4&sslmode=verify-full&sslcert=/certs/node.crt&sslkey=/certs/node.key&sslrootcert=/certs/ca.crt diff --git a/docker-compose.jaeger.yml b/docker-compose.jaeger.yml index 7b9f1b76..22ff2fda 100644 --- a/docker-compose.jaeger.yml +++ b/docker-compose.jaeger.yml @@ -13,8 +13,6 @@ services: - JAEGER_AGENT_HOST=jaeger-agent - JAEGER_AGENT_PORT=6831 - JAEGER_REPORTER_LOG_SPANS=false - depends_on: - - jaeger-agent jaeger-agent: image: jaegertracing/jaeger-agent @@ -49,7 +47,7 @@ services: shared: ipv4_address: 10.10.10.91 depends_on: - - elasticsearch + - wait-for-it jaeger-query: image: jaegertracing/jaeger-query @@ -67,7 +65,18 @@ services: shared: ipv4_address: 10.10.10.92 depends_on: - - elasticsearch + - wait-for-it + + wait-for-it: + build: + context: ./docker/wait-for-it + dockerfile: Dockerfile + command: [ "./wait-for-it.sh", "localhost:9200" ] + container_name: wait-for-it + restart: on-failure + networks: + shared: + ipv4_address: 10.10.10.95 elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.15 diff --git a/docker/wait-for-it/Dockerfile b/docker/wait-for-it/Dockerfile new file mode 100644 index 00000000..f1d23e1f --- /dev/null +++ b/docker/wait-for-it/Dockerfile @@ -0,0 +1,3 @@ +FROM bash:5 + +COPY wait-for-it/wait-for-it.sh ./ diff --git a/docker/wait-for-it/wait-for-it b/docker/wait-for-it/wait-for-it new file mode 160000 index 00000000..81b1373f --- /dev/null +++ b/docker/wait-for-it/wait-for-it @@ -0,0 +1 @@ +Subproject commit 81b1373f17855a4dc21156cfe1694c31d7d1792e