Browse Source

Merge pull request #748 from chaitin/release-5.0.0

feat: release 5.0.0
yrluke 1 năm trước cách đây
mục cha
commit
7971e0ae5a

+ 15 - 0
CHANGELOG.md

@@ -1,5 +1,20 @@
 # SAFELINE-CE CHANGELOG
 
+## [5.0.0] - 2024-03-14
+
+### 新增
+
+- 社区版支持密码登录。系统登录方式改为 密码+可选开启二步验证
+- 专业版
+  - 支持添加多个用户
+  - 支持导出攻击日志为 .csv 文件
+  - 站点的负载均衡支持 IP Hash 算法、最小连接数算法
+
+### 修复
+
+- 修复 luigi 容器有时负载过高降不下来的问题
+- 修复其他一些已知问题
+
 ## [4.4.2] - 2024-03-09
 
 ### 修复

+ 17 - 0
documents/docs/05-about/00-changelog.md

@@ -6,6 +6,23 @@ title: "版本更新记录"
 
 [版本升级方法](/guide/upgrade)
 
+### [5.0.0] - 2024-03-14
+
+#### 新增
+
+- 社区版支持密码登录。系统登录方式改为 密码+可选开启二步验证:
+![](/images/docs/about_changelog/5.0.0-1.png)
+
+- 专业版
+  - 支持添加多个用户
+  - 支持导出攻击日志为 .csv 文件
+  - 站点的负载均衡支持 IP Hash 算法、最小连接数算法
+
+#### 修复
+
+- 修复 luigi 容器有时负载过高降不下来的问题
+- 修复其他一些已知问题
+
 ### [4.4.2] - 2024-03-09
 
 #### 修复

BIN
documents/static/images/docs/about_changelog/5.0.0-1.png


+ 2 - 0
release/latest/compose.yaml

@@ -34,6 +34,8 @@ services:
       - ${SAFELINE_DIR}/resources/mgt:/app/data
     ports:
       - ${MGT_PORT:-9443}:1443
+    healthcheck:
+      test: curl -k -f https://localhost:1443/api/open/health
     environment:
       - MGT_PG=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-pg/safeline-ce?sslmode=disable
     depends_on:

+ 20 - 0
release/latest/setup.sh

@@ -42,6 +42,23 @@ command_exists() {
 	command -v "$1" 2>&1
 }
 
+check_container_health() {
+    local container_name=$1
+    local max_retry=30
+    local retry=0
+    local health_status="unhealthy"
+    echo "Waiting for $container_name to be healthy"
+    while [[ "$health_status" == "unhealthy" && $retry -lt $max_retry ]]; do
+        health_status=$(docker inspect --format='{{.State.Health.Status}}' $container_name 2>/dev/null || echo 'unhealthy')
+        sleep 1
+        retry=$((retry+1))
+    done
+    if [[ "$health_status" == "unhealthy" ]]; then
+        abort "Container $container_name is unhealthy"
+    fi
+    echo "Container $container_name is healthy"
+}
+
 space_left() {
     dir="$1"
     while [ ! -d "$dir" ]; do
@@ -233,6 +250,9 @@ fi
 
 qrcode
 
+check_container_health safeline-mgt
+docker exec safeline-mgt /app/mgt-cli reset-admin --once
+
 warning "雷池 WAF 社区版安装成功,请访问以下地址访问控制台"
 warning "https://0.0.0.0:9443/"
 

+ 20 - 0
release/latest/upgrade.sh

@@ -46,6 +46,23 @@ command_exists() {
     command -v "$1" 2>&1
 }
 
+check_container_health() {
+    local container_name=$1
+    local max_retry=30
+    local retry=0
+    local health_status="unhealthy"
+    echo "Waiting for $container_name to be healthy"
+    while [[ "$health_status" == "unhealthy" && $retry -lt $max_retry ]]; do
+        health_status=$(docker inspect --format='{{.State.Health.Status}}' $container_name 2>/dev/null || echo 'unhealthy')
+        sleep 1
+        retry=$((retry+1))
+    done
+    if [[ "$health_status" == "unhealthy" ]]; then
+        abort "Container $container_name is unhealthy"
+    fi
+    echo "Container $container_name is healthy"
+}
+
 space_left() {
     dir="$1"
     while [ ! -d "$dir" ]; do
@@ -255,5 +272,8 @@ info "雷池升级成功"
 
 qrcode
 
+check_container_health safeline-mgt
+docker exec safeline-mgt /app/mgt-cli reset-admin --once
+
 warning "雷池 WAF 社区版安装成功, 请访问以下地址访问控制台"
 warning "https://0.0.0.0:9443/"

+ 1 - 1
release/latest/version.json

@@ -1,4 +1,4 @@
 {
-  "latest_version": "v4.4.2",
+  "latest_version": "v5.0.0",
   "rec_version": "v4.4.2"
 }