Browse Source

modify the configs of the dockerfile (#1020)

khadgarmage 5 years ago
parent
commit
b77d232dd6

+ 82 - 13
dockerfile/conf/dolphinscheduler/conf/application.properties

@@ -1,19 +1,88 @@
-# server port
-server.port=12345
+# mysql
+#    url=jdbc:postgresql://192.168.220.154:5432/dolphinscheduler
+# base spring data source configuration
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+#spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
+spring.datasource.username=root
+spring.datasource.password=root@123
 
-# session config
-server.servlet.session.timeout=7200
+# connection configuration
+spring.datasource.initialSize=5
+# min connection number
+spring.datasource.minIdle=5
+# max connection number
+spring.datasource.maxActive=50
 
-server.servlet.context-path=/dolphinscheduler/
+# max wait time for get a connection in milliseconds. if configuring maxWait, fair locks are enabled by default and concurrency efficiency decreases.
+# If necessary, unfair locks can be used by configuring the useUnfairLock attribute to true.
+spring.datasource.maxWait=60000
 
-# file size limit for upload
-spring.servlet.multipart.max-file-size=1024MB
-spring.servlet.multipart.max-request-size=1024MB
+# milliseconds for check to close free connections
+spring.datasource.timeBetweenEvictionRunsMillis=60000
 
-#post content
-server.jetty.max-http-post-size=5000000
+# the Destroy thread detects the connection interval and closes the physical connection in milliseconds if the connection idle time is greater than or equal to minEvictableIdleTimeMillis.
+spring.datasource.timeBetweenConnectErrorMillis=60000
 
-spring.messages.encoding=UTF-8
+# the longest time a connection remains idle without being evicted, in milliseconds
+spring.datasource.minEvictableIdleTimeMillis=300000
 
-#i18n classpath folder , file prefix messages, if have many files, use "," seperator
-spring.messages.basename=i18n/messages
+#the SQL used to check whether the connection is valid requires a query statement. If validation Query is null, testOnBorrow, testOnReturn, and testWhileIdle will not work.
+spring.datasource.validationQuery=SELECT 1 FROM DUAL
+
+#check whether the connection is valid for timeout, in seconds
+spring.datasource.validationQueryTimeout=3
+
+# when applying for a connection, if it is detected that the connection is idle longer than time Between Eviction Runs Millis,
+# validation Query is performed to check whether the connection is valid
+spring.datasource.testWhileIdle=true
+
+#execute validation to check if the connection is valid when applying for a connection
+spring.datasource.testOnBorrow=true
+#execute validation to check if the connection is valid when the connection is returned
+spring.datasource.testOnReturn=false
+spring.datasource.defaultAutoCommit=true
+spring.datasource.keepAlive=true
+
+# open PSCache, specify count PSCache for every connection
+spring.datasource.poolPreparedStatements=true
+spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
+
+spring.datasource.spring.datasource.filters=stat,wall,log4j
+spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+
+#mybatis
+mybatis-plus.mapper-locations=classpath*:/org.apache.dolphinscheduler.dao.mapper/*.xml
+
+mybatis-plus.typeEnumsPackage=org.apache.dolphinscheduler.*.enums
+
+#实体扫描,多个package用逗号或者分号分隔
+mybatis-plus.typeAliasesPackage=org.apache.dolphinscheduler.dao.entity
+
+#主键类型  AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
+mybatis-plus.global-config.db-config.id-type=AUTO
+
+#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
+mybatis-plus.global-config.db-config.field-strategy=NOT_NULL
+
+#驼峰下划线转换
+mybatis-plus.global-config.db-config.column-underline=true
+mybatis-plus.global-config.db-config.logic-delete-value=-1
+mybatis-plus.global-config.db-config.logic-not-delete-value=0
+mybatis-plus.global-config.db-config.banner=false
+#原生配置
+mybatis-plus.configuration.map-underscore-to-camel-case=true
+mybatis-plus.configuration.cache-enabled=false
+mybatis-plus.configuration.call-setters-on-nulls=true
+mybatis-plus.configuration.jdbc-type-for-null=null
+
+# data quality analysis is not currently in use. please ignore the following configuration
+# task record flag
+task.record.flag=false
+task.record.datasource.url=jdbc:mysql://127.0.0.1:3306/etl?characterEncoding=UTF-8
+task.record.datasource.username=xx
+task.record.datasource.password=xx
+
+# Logger Config
+logging.level.org.apache.dolphinscheduler.dao=debug

+ 0 - 91
dockerfile/conf/dolphinscheduler/conf/application.yml

@@ -1,91 +0,0 @@
-# mysql
-spring:
-
-    datasource:
-        url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
-        username: root
-        password: root@123
-        #
-        type: com.alibaba.druid.pool.DruidDataSource
-        driver-class-name: com.mysql.jdbc.Driver
-        initialSize: 5
-        minIdle: 5
-        maxActive: 20
-        maxWait: 60000
-        timeBetweenEvictionRunsMillis: 60000
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        spring.datasource.filters: stat,wall,log4j
-        connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-
-#    jpa:
-#      hibernate:
-#        ddl-auto : update
-#    datasource:
-#      platform:
-#      continue-on-error: true
-#      druid:
-#    driver-class-name: org.postgresql.Driver
-#    url: jdbc:postgresql://192.168.220.154:5432/escheduler
-
-
-
-#mybatis
-mybatis-plus:
-  mapper-locations: classpath*:/org.apache.dolphinscheduler.dao.mapper/*.xml
-  typeEnumsPackage: org.apache.dolphinscheduler.*.enums
-  #实体扫描,多个package用逗号或者分号分隔
-  typeAliasesPackage: org.apache.dolphinscheduler.dao.entity
-  global-config:
-    #数据库相关配置
-    db-config:
-      #主键类型  AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
-      id-type: AUTO
-      #字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
-      field-strategy: NOT_NULL
-      #驼峰下划线转换
-      column-underline: true
-      logic-delete-value: -1
-      logic-not-delete-value: 0
-    banner: false
-  #原生配置
-  configuration:
-    map-underscore-to-camel-case: true
-    cache-enabled: false
-    call-setters-on-nulls: true
-    jdbc-type-for-null: 'null'
-
-
-# Logger Config
-logging:
-  level:
-    org.apache.dolphinscheduler.dao: debug
-
----
-# master settings
-spring:
-  profiles: master
-
-server:
-    port: 5566
-
----
-# worker settings
-spring:
-  profiles: worker
-
-server:
-  port: 7788
-
----
-# alert settings
-spring:
-  profiles: alert
-
-server:
-  port: 7789

+ 0 - 5
dockerfile/conf/dolphinscheduler/conf/application_alert.properties

@@ -1,5 +0,0 @@
-logging.config=classpath:alert_logback.xml
-
-# server port
-server.port=7789
-

+ 0 - 4
dockerfile/conf/dolphinscheduler/conf/application_master.properties

@@ -1,4 +0,0 @@
-logging.config=classpath:master_logback.xml
-
-# server port
-server.port=5566

+ 0 - 4
dockerfile/conf/dolphinscheduler/conf/application_worker.properties

@@ -1,4 +0,0 @@
-logging.config=classpath:worker_logback.xml
-
-# server port
-server.port=7788

+ 1 - 1
dockerfile/conf/dolphinscheduler/conf/dao/data_source.properties

@@ -1,7 +1,7 @@
 # base spring data source configuration
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
-spring.datasource.url=jdbc:mysql://127.0.0.1:3306/escheduler?characterEncoding=UTF-8
+spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dolphinscheduler?characterEncoding=UTF-8
 spring.datasource.username=root
 spring.datasource.password=root@123
 

+ 1 - 1
dockerfile/conf/dolphinscheduler/conf/master.properties

@@ -15,7 +15,7 @@ master.task.commit.interval=100
 
 
 # only less than cpu avg load, master server can work. default value : the number of cpu cores * 2
-master.max.cpuload.avg=100
+#master.max.cpuload.avg=100
 
 # only larger than reserved memory, master server can work. default value : physical memory * 1/10, unit is G.
 master.reserved.memory=0.1