Merge remote-tracking branch 'origin/3.6.1-code-conventions' into 3.6.1-code-conventions

pull/2148/head
Gordon 1 year ago
commit 46201b77c3

@ -23,8 +23,8 @@ import (
func main() {
apiCmd := cmd.NewApiCmd(cmd.ApiServer)
apiCmd.AddPortFlag()
apiCmd.AddPrometheusPortFlag()
//apiCmd.AddPortFlag()
//apiCmd.AddPrometheusPortFlag()
if err := apiCmd.Execute(); err != nil {
program.ExitWithError(err)
}

@ -1,4 +1,4 @@
storageLocation: ./_output/logs/
storageLocation: ../../../../logs/
rotationTime: 24
remainRotationCount: 2
remainLogLevel: 6

@ -29,7 +29,7 @@ services:
- openim
redis:
image: redis:7.0.0
image: "${REDIS_IMAGE}"
container_name: redis
ports:
- "16379:6379"
@ -46,7 +46,7 @@ services:
- openim
zookeeper:
image: bitnami/zookeeper:3.8
image: "${ZOOKEEPER_IMAGE}"
container_name: zookeeper
ports:
- "12181:2181"
@ -58,7 +58,7 @@ services:
- openim
kafka:
image: 'bitnami/kafka:3.5.1'
image: "${KAFKA_IMAGE}"
container_name: kafka
restart: always
user: root
@ -83,7 +83,7 @@ services:
minio:
image: minio/minio:RELEASE.2024-01-11T07-46-16Z
image: "${MINIO_IMAGE}"
ports:
- "10005:9000"
- "19090:9090"

@ -24,6 +24,7 @@ start_binaries() {
# Loop to start binary the specified number of times
for ((i=0; i<count; i++)); do
echo "Starting $bin_full_path -i $i -c $OPENIM_OUTPUT_CONFIG"
cd OPENIM_OUTPUT_HOSTBIN
cmd=("$bin_full_path" -i "$i" -c "$OPENIM_OUTPUT_CONFIG")
nohup "${cmd[@]}" >> "${OPENIM_INIT_LOG_FILE}" 2> >(tee -a "$OPENIM_INIT_ERR_LOG_FILE" | while read line; do echo -e "\e[31m${line}\e[0m"; done >&2) &
done
@ -37,6 +38,7 @@ start_tools() {
local bin_full_path=$(get_tool_full_path "$binary")
cmd=("$bin_full_path" -c "$OPENIM_OUTPUT_CONFIG")
echo "Starting ${cmd[@]}"
cd OPENIM_OUTPUT_HOSTBIN_TOOLS
"${cmd[@]}"
ret_val=$?
if [ $ret_val -eq 0 ]; then

@ -0,0 +1,37 @@
@echo off
SETLOCAL EnableDelayedExpansion
SET "ROOT_DIR=%~dp0..\"
SET "OUTPUT_DIR=%ROOT_DIR%_output\bin\platforms\windows\amd64\"
IF NOT EXIST "%OUTPUT_DIR%" (
mkdir "%OUTPUT_DIR%"
)
call :findMainGo "%ROOT_DIR%cmd"
echo Compilation complete.
goto :eof
:findMainGo
FOR /R %1 %%d IN (.) DO (
IF EXIST "%%d\main.go" (
SET "DIR_PATH=%%d"
SET "DIR_NAME=%%~nxd"
echo Found main.go in %%d
echo Compiling %%d...
pushd "%%d"
SET "GOOS=windows"
SET "GOARCH=amd64"
go build -o "!OUTPUT_DIR!!DIR_NAME!.exe" main.go
if ERRORLEVEL 1 (
echo Failed to compile %%d
goto :eof
)
popd
)
)
goto :eof

@ -0,0 +1,16 @@
@echo off
SETLOCAL EnableDelayedExpansion
SET "BIN_DIR=%~dp0..\_output\bin\platforms\windows\amd64"
SET "CONFIG_DIR=%~dp0..\config"
cd "%BIN_DIR%"
FOR %%f IN ("%BIN_DIR%\*.exe") DO (
echo Starting %%~nf...
start cmd /k "%%~f -i 0 -c "%CONFIG_DIR%" & echo Press any key to close this window... & pause>nul"
echo %%~nf started.
)
echo All binaries in the directory have been started.
Loading…
Cancel
Save