1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-21 20:30:55 +00:00

add env BEEGO_CONFIG_PATH

This commit is contained in:
刘豪贵 2020-07-29 21:57:16 +08:00
parent 7a48fbb698
commit 15f04b8da4

View File

@ -150,6 +150,9 @@ func init() {
filename = os.Getenv("BEEGO_RUNMODE") + ".app.conf"
}
appConfigPath = filepath.Join(WorkPath, "conf", filename)
if configPath := os.Getenv("BEEGO_CONFIG_PATH"); configPath != "" {
appConfigPath = configPath
}
if !utils.FileExists(appConfigPath) {
appConfigPath = filepath.Join(AppPath, "conf", filename)
if !utils.FileExists(appConfigPath) {