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