docker-compose to run django with mongodb

前端 未结 4 705
执念已碎
执念已碎 2021-02-13 20:25

I am facing problem using docker-compose to link a django container with postgres and mongo containers? I am trying to use \"docker-compose up\" which starts up the mongo and po

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-13 21:05

    I was able to containerize Django and MongoDB, connect both containers. I used Dockerfiles to build both containers and docker run to start the containers and have them connected. Just follow the steps in this repo. It was necessary for me to use Dockerfiles to have more power over the installed versions of the needed libraries because the latest versions of Django and mongoengine are not compatible. The stable working versions are

    Django==1.10.0
    pymongo==2.7.1
    six==1.10.0
    mongoengine==0.9.0
    

提交回复
热议问题