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

apollo部署时配置文件读取不到 #5311

Open
YanfuWang opened this issue Jan 16, 2025 · 1 comment
Open

apollo部署时配置文件读取不到 #5311

YanfuWang opened this issue Jan 16, 2025 · 1 comment

Comments

@YanfuWang
Copy link

启动config-service和portal的时候发现在github.propertiey配置的数据库连接地址没有读取到

Copy link

dosubot bot commented Jan 16, 2025

@YanfuWang 你好!我是一个可以帮助你解决错误、回答问题并成为贡献者的机器人。我会在等待人类维护者的时候帮助你。

I found a similar solved discussion that might be helpful: apollo1.6.1源码打包后读取不到外部配置. The solution involved using the build.sh script to package Apollo, which activates the github profile [1].

Additionally, to ensure the 'github' profile is correctly configured and activated, you should set the VM options as follows:

-Dapollo_profile=github,auth

If you are using a MySQL database, make sure to specify your database connection details in the VM options:

-Dspring.config-datasource.url=jdbc:mysql://your-mysql-server:3306/ApolloConfigDB?useUnicode=true&characterEncoding=UTF8
-Dspring.config-datasource.username=apollo-username
-Dspring.config-datasource.password=apollo-password

-Dspring.portal-datasource.url=jdbc:mysql://your-mysql-server:3306/ApolloPortalDB?useUnicode=true&characterEncoding=UTF8
-Dspring.portal-datasource.username=apollo-username
-Dspring.portal-datasource.password=apollo-password

Replace the placeholders with your actual MySQL server address, username, password, and database names [2][3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

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

No branches or pull requests

1 participant