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

fix: 首次启动读取本地配置 #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LoadingZhang
Copy link

No description provided.

@ch3nnn
Copy link
Owner

ch3nnn commented Jun 3, 2023

感谢关注, 我理解启动服务没指定环境会默认 fatConfigs 读取文件 configs/configs.go 100行, 并且在 configs/configs.go 105行 将读取配置文件

@LoadingZhang
Copy link
Author

在k8s环境中启动无法读取到本地配置,用的是默认配置。
可能是因为在viper.SetConfigName()和viper.AddConfigPath()之前读取了配置,没有指定正确的路径

@ch3nnn
Copy link
Owner

ch3nnn commented Jun 7, 2023

在k8s环境中启动无法读取到本地配置,用的是默认配置。 可能是因为在viper.SetConfigName()和viper.AddConfigPath()之前读取了配置,没有指定正确的路径路

抱歉, 最近没太有时间。对 k8s 不太熟悉, 有时间我校验一下

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.

2 participants