You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR upgrades the MongoDB image from 5.0 to 8.0 and migrates all shell scripts from the deprecated mongo CLI to mongosh, which is required for MongoDB 6+. A new upgrade guide documents the mandatory sequential upgrade path (5→6→7→8) for existing deployments.
docker-compose.backend.yml: image bumped from mongo:5.0 to mongo:8.0; all three mongo shell scripts (init_02_create_user.sh, post_startup.sh, upsert_users.sh) updated from mongo to mongosh.
doc/June-2026-Upgrade-MongoDB8.md: new step-by-step guide covering the sequential version-by-version upgrade, including the correct use of confirm: true starting from the 7.0 setFeatureCompatibilityVersion call.
README.md: new TOC entry and upgrade-notice section added; commit SHA and date are intentional placeholders to be filled in a follow-up commit per the PR description.
Confidence Score: 3/5
The core image bump and shell-script migration are correct, but the README table-of-contents link will be broken for anyone clicking it until it is fixed.
The README TOC anchor #important-notice-when-upgrading-june-2026 does not match the slug GitHub auto-generates from the heading, so the link lands nowhere. The background: true options in the index-creation scripts are silently ignored by MongoDB 8.0 and carry no runtime risk, only cleanup debt.
README.md — the TOC anchor needs to be corrected before or alongside the follow-up commit that fills in the real SHA and date.
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Existing deployment\nmongo:5.0] --> B{Upgrade required?}
B -- Yes --> C[Backup MongoDB\ndata volumes]
C --> D[Set image to mongo:6.0\nStart container]
D --> E[setFeatureCompatibilityVersion: '6.0'\nno confirm flag needed]
E --> F[Set image to mongo:7.0\nStart container]
F --> G["setFeatureCompatibilityVersion: '7.0'\nconfirm: true required"]
G --> H[Set image to mongo:8.0\nStart container]
H --> I["setFeatureCompatibilityVersion: '8.0'\nconfirm: true required"]
I --> J[Restore full stack\npython3 run.py]
B -- No / New install --> K[mongo:8.0 starts directly\nmongosh used by all scripts]
J --> L([Done])
K --> L
The background: true option has been deprecated since MongoDB 4.2 and is silently ignored in MongoDB 8.0. Since all index builds in MongoDB 4.2+ are already non-blocking by default, this option is dead code and worth removing to keep the scripts clean.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates MongoDB to version 8 and adds instructions for the manual steps that need to be performed.
BREAKING CHANGE after merging, users must upgrade their mongodb files using the process described in the document.
After merge another commit will be done to update the readme with the actual commit SHA