-
Notifications
You must be signed in to change notification settings - Fork 37
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
ISSUE-27: Fix docker mongo setup #28
base: master
Are you sure you want to change the base?
Conversation
- Updated server docker-compose.yml to add container name and new volume - Updated main README.md to add a note on MONGO_HOST configuration - Added mongo-init.sh to initialize mongodb container Fixes CodingGarden#27 💚
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment.
server/mongo-init.sh
Outdated
@@ -0,0 +1,9 @@ | |||
#!/bin/bash | |||
echo '=========================================================================' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not required and happens by default... I removed all containers / images and db-data and was able to start up everything without this script.
The main fix that is needed is this:
- An init script on the API container that waits to see the message
waiting for connections on port 27017
before starting itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the waiting connections I made a PR #39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main fix that is needed is this:
- An init script on the API container that waits to see the message
waiting for connections on port 27017
before starting itself.
See my last comment below.
- Rolled back previous changes after feedback - Updated docker-compose.yml - Updated gitignore - Added initialization scripts for db and api - Added placeholder file Fixes CodingGarden#27 💚
👋 I had some time to work on this today. I updated this PR to undo the changes I've made previously and introduce some new files to solve the issue. It's working fine on *nix. I'm curious to see it running on Mac.
Let me know your thoughts on it. EDIT: I saw you had a bit of hard time understanding/remembering (no offence intended) what's going on. I should have added a comment explaining what I've done. Sorry about that. |
- Rolled back previous changes on gitignore - Updated docker-compose.yml - Updated db and api initialization scripts - Deleted placeholder file Fixes CodingGarden#27 💚
This is the fix for the mongodb initialization. I haven't tested on MacOS and Windows, it's working properly on *nix based OS's.
What was done:
Fixes #27 💚
Type of change
PR Checklist: