git - 在web应用分布式部署的情况下怎么进行配置更新
巴扎黑
巴扎黑 2017-05-02 09:19:02
0
3
756

目前项目采用git管理,设想的是开发机器push到源码库,然后在每台生产环境的windows server上定时push最新代码,但目前的问题是开发阶段配置文件里面的参数之类都是指向测试环境的,生产环境的配置文件是不一样的,而且项目分好多个模块,n多配置文件,一不小心就容易漏掉。

怎么处理比较好?

巴扎黑
巴扎黑

reply all(3)
曾经蜡笔没有小新

We have a configuration center,
Configure it in the configuration center,
For example, test environment jdbc.url = test url
Production environment jdbc.url = production url
Configure jdbc.url = ${jdbc.url} in the configuration file like this
Then when deploying, replacement will be done based on the deployment node, that is, whether it is deployed to the production environment or the test environment.

过去多啦不再A梦

You can use salt to synchronize~

某草草

It is recommended to use it by default when developing locally app.dev.conf 类似这样的配置文件。然后保留仓库的配置文件 app.conf

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!