From f472594819de0f1a4681e175e8e7c232936a3a1a Mon Sep 17 00:00:00 2001 From: Eric Mc Sween Date: Mon, 23 Nov 2020 10:56:33 -0500 Subject: [PATCH] Upgrade build-scripts to 3.4.0 This version fixes docker-compose health checks for dependent services. See https://github.com/overleaf/dev-environment/pull/409 for details. --- services/docstore/buildscript.txt | 2 +- services/docstore/docker-compose.ci.yml | 14 +++++++++++--- services/docstore/docker-compose.yml | 14 +++++++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/services/docstore/buildscript.txt b/services/docstore/buildscript.txt index 706cda6a95..82f94eaa85 100644 --- a/services/docstore/buildscript.txt +++ b/services/docstore/buildscript.txt @@ -5,4 +5,4 @@ docstore --env-pass-through= --node-version=10.22.1 --public-repo=True ---script-version=3.3.5 +--script-version=3.4.0 diff --git a/services/docstore/docker-compose.ci.yml b/services/docstore/docker-compose.ci.yml index b08834d1e6..44afb1765a 100644 --- a/services/docstore/docker-compose.ci.yml +++ b/services/docstore/docker-compose.ci.yml @@ -23,6 +23,7 @@ services: environment: ELASTIC_SEARCH_DSN: es:9200 REDIS_HOST: redis + QUEUES_REDIS_HOST: redis MONGO_HOST: mongo POSTGRES_HOST: postgres GCS_API_ENDPOINT: gcs:9090 @@ -50,7 +51,14 @@ services: user: root mongo: image: mongo:4.0 + healthcheck: + test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" + interval: 1s + retries: 20 gcs: - build: - context: test/acceptance/deps - dockerfile: Dockerfile.fake-gcs + image: fsouza/fake-gcs-server + command: ["--port=9090", "--scheme=http"] + healthcheck: + test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b + interval: 1s + retries: 20 diff --git a/services/docstore/docker-compose.yml b/services/docstore/docker-compose.yml index f854ec67a5..59d22e79ad 100644 --- a/services/docstore/docker-compose.yml +++ b/services/docstore/docker-compose.yml @@ -28,6 +28,7 @@ services: environment: ELASTIC_SEARCH_DSN: es:9200 REDIS_HOST: redis + QUEUES_REDIS_HOST: redis MONGO_HOST: mongo POSTGRES_HOST: postgres GCS_API_ENDPOINT: gcs:9090 @@ -48,8 +49,15 @@ services: mongo: image: mongo:4.0 + healthcheck: + test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" + interval: 1s + retries: 20 gcs: - build: - context: test/acceptance/deps - dockerfile: Dockerfile.fake-gcs + image: fsouza/fake-gcs-server + command: ["--port=9090", "--scheme=http"] + healthcheck: + test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b + interval: 1s + retries: 20