generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add mongo cli tools, use mongo:latest, fixes #29
#30
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9d48f94
Add mongo cli tools
MurzNN f5a2e65
Hardcode the bookworm Debian version
MurzNN bb6c0f1
Use deb822 format for repo
MurzNN 856a66b
Use non rate-limited latest version URL
MurzNN ab6a4a2
Update healthcheck command to use mongosh instead of mongo
MurzNN fc59197
Make universal mongo test command
MurzNN 4481077
Improve the Dockerfile readability
MurzNN 7a675e7
Improve error handling
MurzNN a439508
Update Readme
MurzNN 15b98c6
Make the Dockerfile more pretty
MurzNN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #ddev-generated | ||
| RUN \ | ||
MurzNN marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| LATEST_FULL_VERSION=$(curl -s "https://s3.amazonaws.com/repo.mongodb.org?list-type=2&prefix=apt/debian/dists/bookworm/mongodb-org/&delimiter=/" | grep -oP '(?<=<Prefix>)[^<]+mongodb-org/\K[0-9]+\.[0-9]+' | sort -V | tail -1 || echo "7.0") && \ | ||
| # Extract major version for GPG key (e.g., "7.2" -> "7.0") | ||
| MAJOR_VERSION=$(echo "$LATEST_FULL_VERSION" | cut -d. -f1) && \ | ||
| GPG_VERSION="${MAJOR_VERSION}.0" && \ | ||
| echo "Latest MongoDB version: $LATEST_FULL_VERSION, using GPG key for: $GPG_VERSION" && \ | ||
| # Add MongoDB GPG key using major version | ||
| wget -qO - https://www.mongodb.org/static/pgp/server-${GPG_VERSION}.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-${GPG_VERSION}.gpg && \ | ||
| # Add repository using the full version | ||
| KEYRING_PATH="/usr/share/keyrings/mongodb-server-${GPG_VERSION}.gpg" && \ | ||
| printf "Types: deb\nURIs: http://repo.mongodb.org/apt/debian\nSuites: bookworm/mongodb-org/${LATEST_FULL_VERSION}\nComponents: main\nSigned-By: ${KEYRING_PATH}\n" > /etc/apt/sources.list.d/mongodb-archive.sources && \ | ||
| (apt-get update || true) && \ | ||
| apt-get install -y mongodb-mongosh mongodb-database-tools | ||
stasadev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.