From af975b4eaed22f662fda7b4021953749644a6a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Thu, 25 Jan 2024 13:27:32 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20chen=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- allinone/docker-compose.yml | 1 - allinone/supervisord.conf | 2 +- chen/entrypoint.sh | 3 ++- config_example.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/allinone/docker-compose.yml b/allinone/docker-compose.yml index 6f85c01c..de67b382 100644 --- a/allinone/docker-compose.yml +++ b/allinone/docker-compose.yml @@ -47,7 +47,6 @@ services: environment: SECRET_KEY: ${SECRET_KEY:-vYneAbsXUhe4BghEeedNL7nfWLwaTTmhnwQMvjYOIG25Ofzghk} BOOTSTRAP_TOKEN: ${BOOTSTRAP_TOKEN:-K1ffDfLSIK8SV2PZj6VaxOiv8KuawlJK} - DEBUG: ${DEBUG:-FALSE} LOG_LEVEL: ${LOG_LEVEL:-ERROR} DB_HOST: ${DB_HOST:-mysql} DB_PORT: ${DB_PORT:-3306} diff --git a/allinone/supervisord.conf b/allinone/supervisord.conf index 18855376..0f5bc359 100644 --- a/allinone/supervisord.conf +++ b/allinone/supervisord.conf @@ -57,7 +57,7 @@ autorestart=true [program:chen] priority=100 -environment=PATH="/usr/local/openjdk-17/bin:%(ENV_PATH)s", WORK_DIR="/opt/chen", COMPONENT_NAME="chen", WISP_TRACE_PROCESS=1, EXECUTE_PROGRAM="java -Dfile.encoding=utf-8 --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAME -XX:+ExitOnOutOfMemoryError -jar /opt/chen/chen.jar --mock.enable=false", BIND_PORT=9092, LANG=zh_CN.UTF-8 +environment=GIN_MODE="release", WORK_DIR="/opt/chen", COMPONENT_NAME="chen", WISP_TRACE_PROCESS=1, EXECUTE_PROGRAM="java -Dfile.encoding=utf-8 -XX:+ExitOnOutOfMemoryError -jar /opt/chen/chen.jar --mock.enable=false --logging.level.root=ERROR", BIND_PORT=9092, LANG=zh_CN.UTF-8 directory=/opt/chen/ command=/usr/local/bin/wisp stdout_logfile=/dev/stdout diff --git a/chen/entrypoint.sh b/chen/entrypoint.sh index 441d7b5a..073a1c83 100644 --- a/chen/entrypoint.sh +++ b/chen/entrypoint.sh @@ -6,10 +6,11 @@ until /usr/local/bin/check ${CORE_HOST}/api/health/; do sleep 2 done +export GIN_MODE=release export WORK_DIR=/opt/chen export COMPONENT_NAME=chen export WISP_TRACE_PROCESS=1 -export EXECUTE_PROGRAM="java -Dfile.encoding=utf-8 --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAME -XX:+ExitOnOutOfMemoryError -jar /opt/chen/chen.jar --mock.enable=false" +export EXECUTE_PROGRAM="java -Dfile.encoding=utf-8 -XX:+ExitOnOutOfMemoryError -jar /opt/chen/chen.jar --mock.enable=false" if [ ! "$LOG_LEVEL" ]; then LOG_LEVEL=ERROR diff --git a/config_example.conf b/config_example.conf index e5f2946c..9f89d239 100644 --- a/config_example.conf +++ b/config_example.conf @@ -28,7 +28,7 @@ REDIS_PASSWORD=8URXPL2x3HZMi7xoGTdk3Upj # Core SECRET_KEY=B3f2w8P2PfxIAS7s4URrD9YmSbtqX4vXdPUL217kL9XPUOWrmy BOOTSTRAP_TOKEN=7Q11Vz6R2J6BLAdO -DEBUG=FALSE +# DEBUG=FALSE LOG_LEVEL=ERROR DOMAINS=