Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

开发环境管理 #6

Open
fishtreesugar opened this issue Apr 6, 2016 · 2 comments
Open

开发环境管理 #6

fishtreesugar opened this issue Apr 6, 2016 · 2 comments

Comments

@fishtreesugar
Copy link
Member

现在DB的配置是直接写在代码里, 开发跟部署不是很方便

可以用configurator用下面的形式来管理配置

+ config
  |- config.cfg
  |- dev.cfg
  |- prod.cfg
  |- test.cfg

config.cfg是共享的配置其他三个是不同环境下的配置, 敏感的配置刚在环境变量里面

Yesod 也有类似的解决方案Keter, 没仔细看
参考12factor app

@rnons
Copy link

rnons commented Apr 7, 2016

如果都放环境变量里,用这个也不错 http://hackage.haskell.org/package/load-env

.env.test 进 git,
git ignore .env。每个环境有自己的 .env

@fishtreesugar
Copy link
Member Author

用configurator还是要用其他的工具来管理环境变量的

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

No branches or pull requests

2 participants