diff --git a/opensergo-dashboard-distribution/src/main/resources/bin/startup.sh b/opensergo-dashboard-distribution/src/main/resources/bin/startup.sh index a09a86f..f3949de 100755 --- a/opensergo-dashboard-distribution/src/main/resources/bin/startup.sh +++ b/opensergo-dashboard-distribution/src/main/resources/bin/startup.sh @@ -48,6 +48,6 @@ if [ ! -f "${BASE_DIR}/logs/start.out" ]; then fi JAVA_OPT="${JAVA_OPT} -Xms512m -Xmx512m -Xmn256m" -JAVA_OPT="${JAVA_OPT} -Dloader.path=${BASE_DIR}/opt-libs -jar ${BASE_DIR}/lib/${SERVER}.jar" +JAVA_OPT="${JAVA_OPT} -Dloader.path=${BASE_DIR}/opt-libs -jar ${BASE_DIR}/lib/${SERVER}.jar ${BASE_DIR}/lib/${SERVER}.jar --spring.config.location=${BASE_DIR}/conf/application.yaml" nohup "$JAVA" ${JAVA_OPT} dubbo.admin >> ${BASE_DIR}/logs/catlog.out 2>&1 & echo "${SERVER} is starting,you can check the ${BASE_DIR}/logs/catlog.out" diff --git a/opensergo-dashboard-distribution/src/main/resources/conf/application.yaml b/opensergo-dashboard-distribution/src/main/resources/conf/application.yaml new file mode 100644 index 0000000..54aced9 --- /dev/null +++ b/opensergo-dashboard-distribution/src/main/resources/conf/application.yaml @@ -0,0 +1,43 @@ +#spring settings +server: + servlet: + encoding: + charset: UTF-8 + force: true + enabled: true + + #cookie name setting + session: + cookie: + name: sentinel_dashboard_cookie + +spring: + datasource: + url: jdbc:mysql://localhost:3306/opensergo?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai + username: root + password: + +#logging settings +logging: + level: + org.springframework.web: INFO + file: + name: ${user.home}/logs/csp/sentinel-dashboard.log + pattern: + file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n" +#logging.pattern.console= %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + +#auth settings +auth: + filter: + exclude-urls: /,/sentinel,/auth/login,/auth/logout,/registry/machine,/version,/api/** + exclude-url-suffixes: htm,html,js,css,map,ico,ttf,woff,png + # If auth.enabled=false, Sentinel console disable login + username: sentinel + password: sentinel + +# Inject the dashboard version. It's required to enable +# filtering in pom.xml for this resource file. +sentinel: + dashboard: + version: @project.version@ diff --git a/opensergo-dashboard-distribution/src/main/resources/conf/schema.sql b/opensergo-dashboard-distribution/src/main/resources/conf/schema.sql new file mode 100644 index 0000000..a0d535d --- /dev/null +++ b/opensergo-dashboard-distribution/src/main/resources/conf/schema.sql @@ -0,0 +1,19 @@ +CREATE TABLE `application` +( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `sha256` char(64) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_name` (`name`) +) DEFAULT CHARSET=utf8mb4; + +CREATE TABLE `metadata` +( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `sha256` char(64) NOT NULL, + `app_name` varchar(100) NOT NULL, + `metadata` mediumtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_name` (`app_name`) +) DEFAULT CHARSET=utf8mb4; +