From 0affc11a938dfe0808a56ba0219bbd47de6b8e37 Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 10 Jan 2025 16:49:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor(LogicServer):=20=E6=B7=BB=E5=8A=A0=20s?= =?UTF-8?q?tart.sh=20=E8=84=9A=E6=9C=AC=E5=B9=B6=E6=9B=B4=E6=96=B0=20Docke?= =?UTF-8?q?r=20Compose=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 start.sh 脚本用于启动 Logic 服务器 - 更新 docker-compose.yml 文件,将 entrypoint 改为 start.sh - 优化服务器启动流程,提高自动化程度 --- LogicServer/start.sh | 11 +++++++++++ docker-compose.yml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 LogicServer/start.sh diff --git a/LogicServer/start.sh b/LogicServer/start.sh new file mode 100644 index 0000000..c41de76 --- /dev/null +++ b/LogicServer/start.sh @@ -0,0 +1,11 @@ +#!/bin/bash +cd $(cd "$(dirname "$0")" && pwd) +path=`pwd` +./stop.sh + +echo "======================【启动】========================" +datetime=`date "+%Y-%m-%d.%H:%M:%S"` + +echo "["$datetime"] 正在启动 Logic 服务器 [logicserver_r]..." + +$path/LogicServer/logicserver_r $path/LogicServer/LogicServerLinux.txt \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index e2a0c7e..a87ba61 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,7 +23,7 @@ services: volumes: - ./LogicServer:/data/server/s1/LogicServer - ./wch:/etc/yum/wch - entrypoint: "/data/server/s1/LogicServer/run.sh" + entrypoint: "/data/server/s1/LogicServer/start.sh" network_mode: "host" restart: unless-stopped environment: