chore: remove MongoDB service from Docker Compose and update environm…#72
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the Docker Compose stack by removing the built-in MongoDB service and adjusting how the socket container receives configuration via environment variables.
Changes:
- Removed the
mongoservice and themongo_datavolume fromdocker-compose.yml. - Removed hard-coded
MONGODB_URIwiring and MongoDB dependencies from other services. - Updated the
socketservice to load.env, setNODE_ENV=production, addWEB_SERVER_URL, and simplifieddepends_on.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| depends_on: | ||
| redis: | ||
| condition: service_healthy | ||
| - redis |
Comment on lines
24
to
31
| env_file: | ||
| - .env | ||
| environment: | ||
| REDIS_URL: redis://redis:6379 | ||
| MONGODB_URI: mongodb://mongo:27017/chatapp | ||
| ORIGIN: http://localhost | ||
| SOCKET_SERVER_URL: http://socket:3001 | ||
| depends_on: | ||
| - mongo | ||
| - socket |
Comment on lines
84
to
91
| env_file: | ||
| - .env | ||
| environment: | ||
| REDIS_URL: redis://redis:6379 | ||
| MONGODB_URI: mongodb://mongo:27017/chatapp | ||
| SOCKET_SERVER_URL: http://socket:3001 | ||
| depends_on: | ||
| - redis | ||
| - mongo | ||
| - socket |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 pull request updates the
docker-compose.ymlconfiguration to remove MongoDB and its dependencies, and to improve environment variable management for thesocketservice. The main changes focus on simplifying the service stack and ensuring environment variables are correctly set.Removal of MongoDB:
mongoservice definition, its associated volume (mongo_data), and all references to MongoDB environment variables and dependencies from other services. [1] [2] [3]Environment Variable and Dependency Updates:
.envfile and setNODE_ENVtoproductionfor thesocketservice, and included a newWEB_SERVER_URLenvironment variable.depends_onsyntax for thesocketservice to a simpler list format.…ent variables