diff --git a/blade-service/logpm-distribution/Dockerfile b/blade-service/logpm-distribution/Dockerfile new file mode 100644 index 000000000..6f089ea7d --- /dev/null +++ b/blade-service/logpm-distribution/Dockerfile @@ -0,0 +1,14 @@ +FROM bladex/alpine-java:openjdk8-openj9_cn_slim + +MAINTAINER h5u@163.com + +RUN mkdir -p /logpm/distribution + +WORKDIR /logpm/distribution + +EXPOSE 8500 + +ADD ./target/logpm-distribution.jar ./app.jar + +ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] +CMD ["--spring.profiles.active=test"] diff --git a/blade-service/logpm-distribution/src/main/resources/application-test.yml b/blade-service/logpm-distribution/src/main/resources/application-test.yml index 3b538806f..3720c8c82 100644 --- a/blade-service/logpm-distribution/src/main/resources/application-test.yml +++ b/blade-service/logpm-distribution/src/main/resources/application-test.yml @@ -1,13 +1,13 @@ #服务器端口 server: - port: 8200 + port: 8500 #数据源配置 #spring: # datasource: -# url: ${blade.datasource.test.url} -# username: ${blade.datasource.test.username} -# password: ${blade.datasource.test.password} +# url: ${blade.datasource.dev.url} +# username: ${blade.datasource.dev.username} +# password: ${blade.datasource.dev.password} spring: #排除DruidDataSourceAutoConfigure @@ -16,16 +16,29 @@ spring: datasource: dynamic: druid: + #通用校验配置 + validation-query: select 1 + #启用sql日志拦截器 proxy-filters: - sqlLogInterceptor #设置默认的数据源或者数据源组,默认值即为master primary: master datasource: master: + druid: + #独立校验配置 + validation-query: select 1 + #oracle校验 + #validation-query: select 1 from dual url: ${blade.datasource.distribution.master.url} username: ${blade.datasource.distribution.master.username} password: ${blade.datasource.distribution.master.password} slave: + druid: + #独立校验配置 + validation-query: select 1 + #oracle校验 + #validation-query: select 1 from dual url: ${blade.datasource.distribution.slave.url} username: ${blade.datasource.distribution.slave.username} password: ${blade.datasource.distribution.slave.password}