Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mongodb 7 #119

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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