fix: start.sh

This commit is contained in:
wangfuduo 2026-10-31 14:29:55 +08:00
parent 10015eac1b
commit a1d8a00238
2 changed files with 20 additions and 9 deletions

View File

@ -10,15 +10,15 @@ app_domain = "https://twin.batiao8.com"
ingore_event = "/api/user/event" ingore_event = "/api/user/event"
[mysql] [mysql]
host = "10.0.2.157" host = "10.7.0.36"
port = 3307 port = 3308
user = "twin" user = "twin"
pass = "z[T)5svx--N(nUO(" pass = "z[T)5svx--N(nUO("
db = "twin" db = "twin"
threshold = 10000 threshold = 10000
[elastic] [elastic]
address = "http://10.0.2.133:9200" address = "http://10.7.0.36:9200"
username = "elastic" username = "elastic"
password = "o2NJzeAODwpfAgLJ5SFY" password = "o2NJzeAODwpfAgLJ5SFY"
@ -48,7 +48,7 @@ qy_kf_id = ""
[metric] [metric]
address = "http://10.0.2.157:8086" address = "http://10.7.0.36:8086"
username = "batiao" username = "batiao"
password = "Batiao12B" password = "Batiao12B"
@ -66,4 +66,4 @@ qiniu_secret_key = "C2fUI3qdrQIPkwx2yB4h1Etjbb0LQ15P4aHwShWa"
minio_domain = "https://m.batiao8.com" minio_domain = "https://m.batiao8.com"
minio_bucket = "member" minio_bucket = "member"
minio_access_key = "minio" minio_access_key = "minio"
minio_secret_key = "Minio@Bat123" minio_secret_key = "Minio@Bat123"

View File

@ -1,5 +1,18 @@
#!/bin/bash #!/bin/bash
set -x
crash() {
SERVICE_NAME="$_SERVICE_NAME"
HOSTNAME_="${_POD_NAME:-$(hostname)}"
IP="$_POD_IP"
curl -sS -G "https://t.batiao8.com/ext/service/crash" \
--connect-timeout 3 --max-time 5 \
--retry 2 --retry-delay 1 \
--data-urlencode "service=$SERVICE_NAME" \
--data-urlencode "hostname=$HOSTNAME_" \
--data-urlencode "ip=$IP" \
>/dev/null 2>&1 || true
}
ROOT=$(cd `dirname $0`; pwd) ROOT=$(cd `dirname $0`; pwd)
cd $ROOT cd $ROOT
@ -9,8 +22,6 @@ fi
while [ true ];do while [ true ];do
$ROOT/bin/$BINARY $@ >> log/run.log 2>&1 $ROOT/bin/$BINARY $@ >> log/run.log 2>&1
/usr/local/bin/sendproxy weixin "jiangyong,ranzhenghua" "[$HOSTNAME] [$CONFIG_ENV] [$BINARY] 服务崩溃[`date +"%Y-%m-%d %H:%M:%S"`]" crash
sleep 10 sleep 10
done done