Skip to content

Commit

Permalink
Use mongodb 7
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev committed Sep 7, 2024
1 parent 24164ab commit 481d524
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions lila-docker
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 481d524

Please sign in to comment.