From 086e2a6794f73587b44ea4ae35fcd15bc0d5d4f3 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Tue, 4 Jul 2023 13:39:25 +0100 Subject: [PATCH] Upgrade mongodb to v5 in Server CE dev environment (#13622) GitOrigin-RevId: 5633bde5cec4a1c1c993b735d6e99ec5d8c32717 --- develop/dev.env | 1 + develop/docker-compose.yml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/develop/dev.env b/develop/dev.env index 8a8f368fd4..fd396f19c6 100644 --- a/develop/dev.env +++ b/develop/dev.env @@ -8,6 +8,7 @@ GRACEFUL_SHUTDOWN_DELAY=0 HISTORY_V1_HOST=history-v1 LISTEN_ADDRESS=0.0.0.0 MONGO_HOST=mongo +MONGO_URL=mongodb://mongo/sharelatex?readPreference=secondary&directConnection=true NOTIFICATIONS_HOST=notifications PROJECT_HISTORY_HOST=project-history REALTIME_HOST=real-time diff --git a/develop/docker-compose.yml b/develop/docker-compose.yml index e6c98ffd61..a7a12371a5 100644 --- a/develop/docker-compose.yml +++ b/develop/docker-compose.yml @@ -89,11 +89,16 @@ services: - history-v1-buckets:/buckets mongo: - image: mongo:4.4 + image: mongo:5 + command: --replSet overleaf ports: - "127.0.0.1:27017:27017" # for debugging volumes: - mongo-data:/data/db + healthcheck: + test: 'test $$(mongosh --eval "rs.initiate({ _id: "overleaf", members: [ { _id: 0, host: "mongo:27017" } ] }).ok || rs.status().ok" --quiet) -eq 1' + interval: 30s + start_period: 30s notifications: build: