将我的 Jhipster 应用程序部署到 heroku 后,我想将云弹性搜索 (Bonsai) 与 JHipster 一起使用。Bonsai 提供以下环境变量:
$BONSAI_URL
这是如何在 application-prod.yml 中正确添加的?我一直在阅读文档并尝试将其设置为集群节点值和主机。但我有点失落。任何提示都非常受欢迎。
应用程序-prod.yml
spring:
devtools:
restart:
enabled: false
livereload:
enabled: false
datasource:
url: jdbc:mysql://localhost:3306/App?useUnicode=true&characterEncoding=utf8&useSSL=false
name:
username: root
password:
hikari:
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
jpa:
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
database: MYSQL
show_sql: false
properties:
hibernate.cache.use_second_level_cache: true
hibernate.cache.use_query_cache: false
hibernate.generate_statistics: false
hibernate.cache.region.factory_class: org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory
data:
elasticsearch:
network:
host: ${BONSAI_URL}
cluster-name: VLT
cluster-nodes: localhost:9300
mail:
host: smtp.sendgrid.net
port: 587
username: ${SENDGRID_USERNAME}
password: ${SENDGRID_PASSWORD}
protocol: smtp
tls: false
auth: true
from: noreply@app.com
thymeleaf:
cache: true
liquibase:
contexts: prod
server:
port: 8080
compression:
enabled: true
mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json
min-response-size: 1024