-
Notifications
You must be signed in to change notification settings - Fork 35
no port available, no flask-mongodb communication #1
Description
Hello Ishmeet,
I forked your project ( https://github.com/ndrini/PublicProjects/tree/hotfix/Python/MongoDB%20API ) and I discover several issues.
Please, have a look to branch hotfix.
-
In the docker-compose file was missing
ports:
- "5000:27017"
so no port was exposed -
no database initialization (no database IshmeetDB and collection people)
-
no communication (even if manually create the database) inside the container
$ docker exec -it feb99612817c bash
root@feb99612817c:/# mongouse IshmeetDB > db.createCollection('people')
db.people.insert({ "First_Name": "Barbara", "Age": 66 })
WriteResult({ "nInserted" : 1 })
db.people.find()
{ "_id" : ObjectId("60519022e03abca730129cc9"), "First_Name" : "Artur" }
{ "_id" : ObjectId("60519044e03abca730129cca"), "First_Name" : "Barbara", "Age" : 66 }
db.people.insert({ "First_Name": "Carl", "Age": 96 })
WriteResult({ "nInserted" : 1 })