From 5d7c8295f33ed8a96b68be4df80e208dd0d83616 Mon Sep 17 00:00:00 2001 From: Trevor Fitzgerald Date: Sat, 7 Sep 2024 06:47:34 -0700 Subject: [PATCH] Use mongodb 7 (#119) --- docker-compose.yml | 6 +++--- lila-docker | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b72f4188..c4b4f41c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: mongodb: - image: mongo:5.0.28-focal + image: mongo:7.0.14-jammy restart: unless-stopped command: mongod --bind_ip_all --replSet rs0 healthcheck: @@ -16,7 +16,7 @@ services: - ./scripts:/scripts mongodb_secondary: - image: mongo:5.0.28-focal + image: mongo:7.0.14-jammy restart: unless-stopped command: mongod --bind_ip_all --replSet rs0 networks: @@ -362,7 +362,7 @@ services: profiles: - email - mongo_express: + mongo_express_primary: image: mongo-express:1.0.2-20-alpine3.19 restart: unless-stopped ports: diff --git a/lila-docker b/lila-docker index 3fa207f3..dd7a3a98 100755 --- a/lila-docker +++ b/lila-docker @@ -91,7 +91,7 @@ setup_database() { return fi - while ! docker compose exec mongodb mongo --eval "db.adminCommand('ping')" > /dev/null 2>&1; do + while ! docker compose exec mongodb mongosh --eval "db.runCommand({ping: 1})" > /dev/null 2>&1; do echo "Waiting for mongodb to be ready..." sleep 1 done @@ -116,11 +116,11 @@ setup_database() { "${params[@]}" echo -n "Creating database indexes..." - docker compose exec mongodb mongo --quiet lichess /lila/bin/mongodb/indexes.js + docker compose exec mongodb mongosh --quiet lichess /lila/bin/mongodb/indexes.js echo " done" echo -n "Creating user trophies..." - docker compose exec mongodb mongo --quiet lichess /lila/bin/mongodb/create-trophy-kinds.js + docker compose exec mongodb mongosh --quiet lichess /lila/bin/mongodb/create-trophy-kinds.js echo " done" docker compose run --rm python python /scripts/users.py