Skip to content

feat: simplify MongoDB initialization in docker-compose#3634

Open
AchrefHemissi wants to merge 3 commits intoopenimsdk:mainfrom
AchrefHemissi:feat-simplify-mongodb-init
Open

feat: simplify MongoDB initialization in docker-compose#3634
AchrefHemissi wants to merge 3 commits intoopenimsdk:mainfrom
AchrefHemissi:feat-simplify-mongodb-init

Conversation

@AchrefHemissi
Copy link
Copy Markdown

@AchrefHemissi AchrefHemissi commented Dec 3, 2025

  • Replace complex inline bash script with dedicated init script
  • Use MongoDB built-in /docker-entrypoint-initdb.d/ mechanism
  • Create scripts/mongo-init.sh for user creation
  • Improve readability and maintainability

🅰 Please add the issue ID after "Fixes #"

Fixes #3632

- Replace complex inline bash script with dedicated init script
- Use MongoDB built-in /docker-entrypoint-initdb.d/ mechanism
- Create scripts/mongo-init.sh for user creation
- Improve readability and maintainability

Fixes openimsdk#3632
Copilot AI review requested due to automatic review settings December 3, 2025 16:41
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 3, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 3, 2025

🤖 All Contributors have signed the CLA.
The signed information is recorded here
Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request simplifies the MongoDB initialization process in docker-compose by replacing an inline bash script with a dedicated initialization script that leverages MongoDB's built-in /docker-entrypoint-initdb.d/ mechanism.

Key Changes:

  • Created scripts/mongo-init.sh to handle OpenIM user creation in MongoDB
  • Simplified MongoDB service configuration in docker-compose.yml by removing complex inline bash commands
  • Converted the wiredTigerCacheSizeGB from an environment variable to a command-line argument

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
scripts/mongo-init.sh New initialization script for creating MongoDB OpenIM user with proper authentication
docker-compose.yml Simplified MongoDB service configuration by using dedicated init script, cleaned up Redis command formatting, and removed trailing whitespace

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/mongo-init.sh Outdated
Comment thread scripts/mongo-init.sh Outdated
Comment thread scripts/mongo-init.sh
Comment thread scripts/mongo-init.sh
@AchrefHemissi AchrefHemissi changed the title feat: simplify MongoDB initialization in docker-compose #3633 feat: simplify MongoDB initialization in docker-compose Dec 3, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker-compose.yml
Comment thread scripts/mongo-init.sh
@AchrefHemissi
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Simplify MongoDB initialization in docker-compose

2 participants