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

feat: add docker/compose #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Misakaou
Copy link

添加docker部署方式

包含内容

  • docker-compose部署
  • docker部署
  • readme更新

存在的潜在问题

  • 在config.yml中,mongodb的host配置十分难以定位,因此为了可以正常运行,Dockerfile中粗暴地将所有的host: 127.0.0.1替换,可能会存在潜在问题
    • 可能的解决方式:config.yml中,mongodb配置节下的host: 127.0.0.1替换为host: 127.0.0.1 #mongo host或者其他存在唯一行的特征的内容方便Dockerfile中使用sed替换,redis配置节同理。
  • src/install/install.js中,有些地方使用例如fs.existsSync('./install.lock')的方式定位文件,有的地方使用path.join(__dirname, '../config/config.yml')的方式定位文件。后一种定位文件的方式存在__dirname路径是src/install的问题,例如config.yml会定位到src/config/config.yml,实际上这个路径并不存在。暂时没有好的办法,先在Dockerfile中粗暴地将它替换掉了。

@Misakaou
Copy link
Author

第二个问题的解决实在太不优雅了,不应当这样粗暴地替换。在未来的commit中我会找一些更优雅的解决办法,当前Dockerfile中这个解决方法在install.js不进行大范围更新的时候临时使用应该没有问题。

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

Successfully merging this pull request may close these issues.

None yet

1 participant