Coder Social home page Coder Social logo

Comments (4)

amazingTest avatar amazingTest commented on May 19, 2024

第一个 issue 来了~

我来描述一下根据你的问题我的一些观点与想法~

  1. docker容器化部署中数据库连接是可以(建议)通过 docker内网IP 连接的,所以与 是否已经有一个mongo Container跑在27017端口上 无关,因为每一个 container 有不同的内网 IP。

  2. 可以测试一下环境变量是否设置正确,通过 python ./backend/config.py 命令*。

  3. 然后通过 docker inspect 命令查询你想连接的数据库容器的 docker内网 IP 地址

  4. 检查 数据库IP 地址是否与 环境变量设置的一致

  5. 不需要修改/etc/profile->AUTOTEST_PLATFORM_MONGO_PORT=27016 , 如果你连接的是 docker 容器内部的数据库。

  6. 启动docker参数-p 27016:27016 如果是指启动数据库的话,这样是没有任何意义的,因为你将容器内的 27016 端口(暂时没有意义的端口),映射到了宿主机的 27016 上(也没什么意义)

  7. sh deploy 27016 只是表示最后访问项目的地址为 XXX.xxx.xxx: 27016 ,与数据库无关

综上所述,可以用以下步骤进行尝试:

  1. 修改/etc/profile->AUTOTEST_PLATFORM_MONGO_PORT=27017

  2. 通过 docker 内网 IP 设置数据库相关的环境变量

  3. 再次运行 sh deploy ${PORT}

期待你的回复~

from taisite-platform.

apert4160 avatar apert4160 commented on May 19, 2024

感谢回复,晚些时候试过来反馈

from taisite-platform.

apert4160 avatar apert4160 commented on May 19, 2024

原来我们可能误会了,我原意是想另外启动一个mongo container,单独运行Taisite项目。

把环境变量配置到已经在运行的Mongo上,可以成功部署项目了。

建议把README的部署部分回滚回去,搬到另一个地方不是很友好,太功利了。(虽然不太适合在这说)

from taisite-platform.

amazingTest avatar amazingTest commented on May 19, 2024

成功部署了就好~

没关系,这里没有什么不适合说的,我尊重你的建议,但我也有我自己的考虑哈

from taisite-platform.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.