Skip to content
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

no port available, no flask-mongodb communication #1

Open
ndrini opened this issue Mar 17, 2021 · 0 comments
Open

no port available, no flask-mongodb communication #1

ndrini opened this issue Mar 17, 2021 · 0 comments

Comments

@ndrini
Copy link

ndrini commented Mar 17, 2021

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.

  1. In the docker-compose file was missing
    ports:
    - "5000:27017"
    so no port was exposed

  2. no database initialization (no database IshmeetDB and collection people)

  3. no communication (even if manually create the database) inside the container

    $ docker exec -it feb99612817c bash
    root@feb99612817c:/# mongo

    use 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 })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant