-
Notifications
You must be signed in to change notification settings - Fork 180
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
增加Docker支持 #37
Open
Qquanwei
wants to merge
10
commits into
DXY-F2E:dev
Choose a base branch
from
Qquanwei:dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
增加Docker支持 #37
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Anyone follow this PR ? |
nobody |
Procrastination. 🤓 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
目前项目内的配置缺少有关docker的,所以需要修改部分配置才可以运行。
跑docker前需要修改 client/config/index.js, 将ip替换成跑docker宿主vm地址
编译docker镜像
运行docker容器
然后打开docker vm ip:8888即可
win/mac 下一般默认的docker vm ip为 192.168.99.100.
目前的不足.
mongod 现在默认连接地址为 127.0.0.1 , 导致docker只能通过共享network namespace来连接两个容器,这样不利于容器的独立 也不利于分布式数据库的部署。 建议server端连接 mongodb://api-mongo:27017
给mongo分配一个独立的域名连接,因为mongo总是运行在内网环境,所以只需部署机增加host映射即可。好处是可以动态更换ip,方便docker部署。
client/config/index.js 这里的动态ip可能无法适应目前的环境,如果能静态编译时生成ip最好了。