我刚开始使用boxfuse,似乎找不到一种方法来配置我的dev数据库。
在我的boxfuse.yml中(对于数据库部分):
database:
# the name of your JDBC driver
driverClass: com.mysql.jdbc.Driver
# the username
user: root
# the password
password: <password>
# the JDBC URL
url: jdbc:mysql://10.0.0.84:3306/dmsdb
# any properties specific to your JDBC driver:
properties:
charSet: UTF-8
hibernate.dialect: org.hibernate.dialect.MySQLInnoDBDialect
# the maximum amount of time to wait on an empty pool before throwing an exception
maxWaitForConnection: 1s
# the SQL query to run when validating a connection's liveness
validationQuery: "/* MyApplication Health Check */ SELECT 1"
# the minimum number of connections to keep open
minSize: 8
# the maximum number of connections to keep open
maxSize: 32
# whether or not idle connections should be validated
checkConnectionWhileIdle: false如果我尝试运行它(运行boxfuse),我的应用程序根本就不能工作。
boxfuse信息产生以下内容:
oxfuse client v.1.18.7.938版权2016年Boxfuse。版权所有。
帐户: mlr11 (mlr11)
有关开发环境中的mlr11 11/dms-service的信息:
App Type : Single Instance with Zero Downtime updates
App URL : http://127.0.0.1:8082
DB Type : MySQL database
DB URL : jdbc:mysql://localhost:3306/boxfuse-dev-db
DB Host : localhost
DB Port : 3306
DB Database : boxfuse-dev-db
DB User : boxfuse-dev-db
DB Password : boxfuse-dev-db
DB Status : available这和我预期的大不相同。网址、数据库、用户、密码)与我的boxfuse.yml文件不匹配。
我错过了什么。我知道这一定很简单。我做了各种各样的搜索,读了几遍医生的书。我似乎找不到出什么问题了。任何指示都将不胜感激。
发布于 2016-04-14 14:18:44
从您发布的配置文件中,我假设这是一个下拉向导应用程序。
由于Boxfuse应用程序被配置为使用MySQL数据库,所以Boxfuse在第一次部署应用程序时会在每个环境中自动提供一个数据库。在您的例子中,您可以在开发环境中看到该数据库的连接信息,并在您在问题中发布的输出中看到。
Boxfuse公开这些值(db url、user、password、.)作为环境变量(https://cloudcaptain.sh/docs/databases#envvars),并自动配置框架(我假设是Dropwizard)来使用这些变量,而不是配置文件中包含的那些变量。它将通过将-Ddw.database.url=$BOXFUSE_DATABASE_URL -Ddw.database.user=$BOXFUSE_DATABASE_USER -Ddw.database.password=$BOXFUSE_DATABASE_PASSWORD作为参数传递给JVM来做到这一点。
此外,在Boxfuse和应用程序实例都已正确启动的VirtualBox GUI中,您的VirtualBox安装是完全功能的,能够启动VM。
https://stackoverflow.com/questions/36620591
复制相似问题