Skip to content

Commit

Permalink
Merge pull request #748 from chaitin/release-5.0.0
Browse files Browse the repository at this point in the history
feat: release 5.0.0
  • Loading branch information
yrluke authored Mar 14, 2024
2 parents 50b50d9 + 8d7592a commit 7971e0a
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 1 deletion.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# SAFELINE-CE CHANGELOG

## [5.0.0] - 2024-03-14

### 新增

- 社区版支持密码登录。系统登录方式改为 密码+可选开启二步验证
- 专业版
- 支持添加多个用户
- 支持导出攻击日志为 .csv 文件
- 站点的负载均衡支持 IP Hash 算法、最小连接数算法

### 修复

- 修复 luigi 容器有时负载过高降不下来的问题
- 修复其他一些已知问题

## [4.4.2] - 2024-03-09

### 修复
Expand Down
17 changes: 17 additions & 0 deletions documents/docs/05-about/00-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

#### 修复
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions release/latest/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
20 changes: 20 additions & 0 deletions release/latest/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 changes: 20 additions & 0 deletions release/latest/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/"
2 changes: 1 addition & 1 deletion release/latest/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"latest_version": "v4.4.2",
"latest_version": "v5.0.0",
"rec_version": "v4.4.2"
}

0 comments on commit 7971e0a

Please sign in to comment.