mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 22:46:49 +00:00
(improvement)(project)Introduce aibi-env.sh script to simplify user settings.
(improvement)(project)Introduce aibi-env.sh script to simplify user settings. (improvement)(project)Introduce aibi-env.sh script to simplify user settings.
This commit is contained in:
@@ -4,6 +4,7 @@ chcp 65001
|
||||
|
||||
set "sbinDir=%~dp0"
|
||||
call %sbinDir%/supersonic-common.bat %*
|
||||
call %sbinDir%/supersonic-env.bat %*
|
||||
|
||||
set "command=%~1"
|
||||
set "service=%~2"
|
||||
@@ -14,7 +15,7 @@ if "%service%"=="" (
|
||||
)
|
||||
|
||||
if "%profile%"=="" (
|
||||
set "profile=local"
|
||||
set "profile=%S2_DB_TYPE%"
|
||||
)
|
||||
|
||||
set "model_name=%service%"
|
||||
@@ -54,7 +55,8 @@ if "%command%"=="restart" (
|
||||
set "webDir=%baseDir%\webapp"
|
||||
set "logDir=%baseDir%\logs"
|
||||
set "classpath=%baseDir%;%webDir%;%libDir%\*;%confDir%"
|
||||
set "java-command=-Dfile.encoding=UTF-8 -Duser.language=Zh -Duser.region=CN -Duser.timezone=GMT+08 -Dspring.profiles.active=%profile% -Xms1024m -Xmx1024m -cp %CLASSPATH% %MAIN_CLASS%"
|
||||
set "java-command=-Dfile.encoding=UTF-8 -Duser.language=Zh -Duser.region=CN -Duser.timezone=GMT+08 -Dspring.profiles.active=%profile% -Xms1024m
|
||||
-Xmx1024m -cp %CLASSPATH% %MAIN_CLASS%"
|
||||
if not exist %logDir% mkdir %logDir%
|
||||
start /B java %java-command% >nul 2>&1
|
||||
timeout /t 10 >nul
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
sbinDir=$(cd "$(dirname "$0")"; pwd)
|
||||
source $sbinDir/supersonic-common.sh
|
||||
source $sbinDir/supersonic-env.sh
|
||||
|
||||
command=$1
|
||||
service=$2
|
||||
@@ -12,7 +13,7 @@ if [ -z "$service" ]; then
|
||||
fi
|
||||
|
||||
if [ -z "$profile" ]; then
|
||||
profile="local"
|
||||
profile=${S2_DB_TYPE}
|
||||
fi
|
||||
|
||||
model_name=$service
|
||||
|
||||
8
assembly/bin/supersonic-env.bat
Executable file
8
assembly/bin/supersonic-env.bat
Executable file
@@ -0,0 +1,8 @@
|
||||
:: Set below DB configs to connect to your own database
|
||||
:: Supported DB_TYPE: h2, mysql, postgres
|
||||
set "S2_DB_TYPE=h2"
|
||||
set "S2_DB_HOST="
|
||||
set "S2_DB_PORT="
|
||||
set "S2_DB_USER="
|
||||
set "S2_DB_PASSWORD="
|
||||
set "S2_DB_DATABASE="
|
||||
10
assembly/bin/supersonic-env.sh
Executable file
10
assembly/bin/supersonic-env.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#### Set below DB configs to connect to your own database
|
||||
# Supported DB_TYPE: h2, mysql, postgres
|
||||
export S2_DB_TYPE=h2
|
||||
export S2_DB_HOST=
|
||||
export S2_DB_PORT=
|
||||
export S2_DB_USER=
|
||||
export S2_DB_PASSWORD=
|
||||
export S2_DB_DATABASE=
|
||||
Reference in New Issue
Block a user