Skip to content

Commit c54d9cb

Browse files
chore: release v2.3.1 (#77)
访问媒体文件不再需要开放 9000 端口,同时修复 https 协议无法使用媒体资源的问题
1 parent 815596d commit c54d9cb

File tree

8 files changed

+56
-52
lines changed

8 files changed

+56
-52
lines changed

docker/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ $ ./install.sh
4343
| 端口号 | 是否可配置 | 用途说明 |
4444
| ------ | ---------- | ------------------------------------------------------------- |
4545
| 8000 || 网关服务端口,可用于接收外部请求,建议在公网环境中设置为 `80` |
46-
| 9000 || MinIO 签名端口,用于对象存储访问,端口固定不可修改 |
4746
4847
### 可配置项
4948

docker/README_EN.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ If you deploy on a server and want to access and record experiments remotely, ma
4141
| Port | Configurable | Description |
4242
| ---- | ------------ | ----------------------------------------------------------------------------------------------------- |
4343
| 8000 | Yes | Gateway service port. Handles external requests. For public deployments, consider setting it to `80`. |
44-
| 9000 | No | MinIO signature port for object storage access. This port is fixed and cannot be changed. |
4544
4645
### Configurable Items
4746

docker/docker-compose.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
# Gateway
2222
traefik:
2323
<<: *common
24-
image: ccr.ccs.tencentyun.com/self-hosted/traefik:v3.0
24+
image: ccr.ccs.tencentyun.com/self-hosted/traefik:v3.1
2525
container_name: swanlab-traefik
2626
ports:
2727
- "8000:80"
@@ -116,8 +116,6 @@ services:
116116
<<: *common
117117
image: ccr.ccs.tencentyun.com/self-hosted/minio:RELEASE.2025-02-28T09-55-16Z
118118
container_name: swanlab-minio
119-
ports:
120-
- "9000:9000"
121119
volumes:
122120
- ./data/minio:/data
123121
environment:
@@ -127,8 +125,9 @@ services:
127125
- "traefik.http.services.minio.loadbalancer.server.port=9000"
128126
- "traefik.http.routers.minio1.rule=PathPrefix(`/swanlab-public`)"
129127
- "traefik.http.routers.minio1.middlewares=minio-host@file"
130-
- "traefik.http.routers.minio2.rule=PathPrefix(`/swanlab-private`)"
128+
- "traefik.http.routers.minio2.rule=PathPrefix(`/swanlab-private/exports`)"
131129
- "traefik.http.routers.minio2.middlewares=minio-host@file"
130+
- "traefik.http.routers.minio3.rule=PathPrefix(`/swanlab-private`)"
132131
command: server /data --console-address ":9001"
133132
healthcheck:
134133
test: ["CMD", "mc", "ready", "local"]
@@ -158,7 +157,7 @@ services:
158157
# swanlab services
159158
swanlab-server:
160159
<<: *common
161-
image: ccr.ccs.tencentyun.com/self-hosted/swanlab-server:v2.3
160+
image: ccr.ccs.tencentyun.com/self-hosted/swanlab-server:v2.3.1
162161
container_name: swanlab-server
163162
depends_on:
164163
postgres:
@@ -172,7 +171,7 @@ services:
172171
- SERVER_PREFIX=/api
173172
- ACCESS_KEY=swanlab
174173
- SECRET_KEY=swanlab-minio
175-
- VERSION=2.3.0
174+
- VERSION=2.3.1
176175
labels:
177176
- "traefik.http.services.swanlab-server.loadbalancer.server.port=3000"
178177
- "traefik.http.routers.swanlab-server.rule=PathPrefix(`/api`)"

docker/install-dockerhub.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ services:
187187
# Gateway
188188
traefik:
189189
<<: *common
190-
image: swanlab/traefik:v3.0
190+
image: swanlab/traefik:v3.1
191191
container_name: swanlab-traefik
192192
ports:
193193
- "${EXPOSE_PORT}:80"
@@ -282,8 +282,6 @@ services:
282282
<<: *common
283283
image: swanlab/minio:RELEASE.2025-02-28T09-55-16Z
284284
container_name: swanlab-minio
285-
ports:
286-
- "9000:9000"
287285
volumes:
288286
- ${DATA_PATH}/minio:/data
289287
environment:
@@ -293,8 +291,9 @@ services:
293291
- "traefik.http.services.minio.loadbalancer.server.port=9000"
294292
- "traefik.http.routers.minio1.rule=PathPrefix(\`/swanlab-public\`)"
295293
- "traefik.http.routers.minio1.middlewares=minio-host@file"
296-
- "traefik.http.routers.minio2.rule=PathPrefix(\`/swanlab-private\`)"
294+
- "traefik.http.routers.minio2.rule=PathPrefix(\`/swanlab-private/exports\`)"
297295
- "traefik.http.routers.minio2.middlewares=minio-host@file"
296+
- "traefik.http.routers.minio3.rule=PathPrefix(\`/swanlab-private\`)"
298297
command: server /data --console-address ":9001"
299298
healthcheck:
300299
test: ["CMD", "mc", "ready", "local"]
@@ -324,7 +323,7 @@ services:
324323
# swanlab services
325324
swanlab-server:
326325
<<: *common
327-
image: swanlab/swanlab-server:v2.3
326+
image: swanlab/swanlab-server:v2.3.1
328327
container_name: swanlab-server
329328
depends_on:
330329
postgres:
@@ -338,7 +337,7 @@ services:
338337
- SERVER_PREFIX=/api
339338
- ACCESS_KEY=swanlab
340339
- SECRET_KEY=${MINIO_ROOT_PASSWORD}
341-
- VERSION=2.3.0
340+
- VERSION=2.3.1
342341
labels:
343342
- "traefik.http.services.swanlab-server.loadbalancer.server.port=3000"
344343
- "traefik.http.routers.swanlab-server.rule=PathPrefix(\`/api\`)"

docker/install-nowsl.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ services:
193193
# Gateway
194194
traefik:
195195
<<: *common
196-
image: ccr.ccs.tencentyun.com/self-hosted/traefik:v3.0
196+
image: ccr.ccs.tencentyun.com/self-hosted/traefik:v3.1
197197
container_name: swanlab-traefik
198198
ports:
199199
- "${EXPOSE_PORT}:80"
@@ -290,8 +290,6 @@ services:
290290
<<: *common
291291
image: ccr.ccs.tencentyun.com/self-hosted/minio:RELEASE.2025-02-28T09-55-16Z
292292
container_name: swanlab-minio
293-
ports:
294-
- "9000:9000"
295293
volumes:
296294
- ${DATA_PATH}/minio:/data
297295
environment:
@@ -301,8 +299,9 @@ services:
301299
- "traefik.http.services.minio.loadbalancer.server.port=9000"
302300
- "traefik.http.routers.minio1.rule=PathPrefix(\`/swanlab-public\`)"
303301
- "traefik.http.routers.minio1.middlewares=minio-host@file"
304-
- "traefik.http.routers.minio2.rule=PathPrefix(\`/swanlab-private\`)"
302+
- "traefik.http.routers.minio2.rule=PathPrefix(\`/swanlab-private/exports\`)"
305303
- "traefik.http.routers.minio2.middlewares=minio-host@file"
304+
- "traefik.http.routers.minio3.rule=PathPrefix(\`/swanlab-private\`)"
306305
command: server /data --console-address ":9001"
307306
healthcheck:
308307
test: ["CMD", "mc", "ready", "local"]
@@ -332,7 +331,7 @@ services:
332331
# swanlab services
333332
swanlab-server:
334333
<<: *common
335-
image: ccr.ccs.tencentyun.com/self-hosted/swanlab-server:v2.3
334+
image: ccr.ccs.tencentyun.com/self-hosted/swanlab-server:v2.3.1
336335
container_name: swanlab-server
337336
depends_on:
338337
postgres:
@@ -346,7 +345,7 @@ services:
346345
- SERVER_PREFIX=/api
347346
- ACCESS_KEY=swanlab
348347
- SECRET_KEY=${MINIO_ROOT_PASSWORD}
349-
- VERSION=2.3.0
348+
- VERSION=2.3.1
350349
labels:
351350
- "traefik.http.services.swanlab-server.loadbalancer.server.port=3000"
352351
- "traefik.http.routers.swanlab-server.rule=PathPrefix(\`/api\`)"

docker/install.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ services:
191191
# Gateway
192192
traefik:
193193
<<: *common
194-
image: ccr.ccs.tencentyun.com/self-hosted/traefik:v3.0
194+
image: ccr.ccs.tencentyun.com/self-hosted/traefik:v3.1
195195
container_name: swanlab-traefik
196196
ports:
197197
- "${EXPOSE_PORT}:80"
@@ -286,8 +286,6 @@ services:
286286
<<: *common
287287
image: ccr.ccs.tencentyun.com/self-hosted/minio:RELEASE.2025-02-28T09-55-16Z
288288
container_name: swanlab-minio
289-
ports:
290-
- "9000:9000"
291289
volumes:
292290
- ${DATA_PATH}/minio:/data
293291
environment:
@@ -297,8 +295,9 @@ services:
297295
- "traefik.http.services.minio.loadbalancer.server.port=9000"
298296
- "traefik.http.routers.minio1.rule=PathPrefix(\`/swanlab-public\`)"
299297
- "traefik.http.routers.minio1.middlewares=minio-host@file"
300-
- "traefik.http.routers.minio2.rule=PathPrefix(\`/swanlab-private\`)"
298+
- "traefik.http.routers.minio2.rule=PathPrefix(\`/swanlab-private/exports\`)"
301299
- "traefik.http.routers.minio2.middlewares=minio-host@file"
300+
- "traefik.http.routers.minio3.rule=PathPrefix(\`/swanlab-private\`)"
302301
command: server /data --console-address ":9001"
303302
healthcheck:
304303
test: ["CMD", "mc", "ready", "local"]
@@ -328,7 +327,7 @@ services:
328327
# swanlab services
329328
swanlab-server:
330329
<<: *common
331-
image: ccr.ccs.tencentyun.com/self-hosted/swanlab-server:v2.3
330+
image: ccr.ccs.tencentyun.com/self-hosted/swanlab-server:v2.3.1
332331
container_name: swanlab-server
333332
depends_on:
334333
postgres:
@@ -342,7 +341,7 @@ services:
342341
- SERVER_PREFIX=/api
343342
- ACCESS_KEY=swanlab
344343
- SECRET_KEY=${MINIO_ROOT_PASSWORD}
345-
- VERSION=2.3.0
344+
- VERSION=2.3.1
346345
labels:
347346
- "traefik.http.services.swanlab-server.loadbalancer.server.port=3000"
348347
- "traefik.http.routers.swanlab-server.rule=PathPrefix(\`/api\`)"

docker/upgrade.sh

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ update_server_command() {
132132
# change version
133133
update_version() {
134134
local version="$1"
135-
local full_version="${version}.0"
136135

137136
if [ -z "$version" ]; then
138137
echo "Error: Version number is required."
@@ -144,23 +143,12 @@ update_version() {
144143
s/(:v)[^:]+$/\1${version}/
145144
}
146145
" "$COMPOSE_FILE"
147-
148-
sed -i.bak -E '
149-
/^[[:space:]]*swanlab-server:/,/^$/ {
150-
/^[[:space:]]*environment:/,/^$/ {
151-
/^[[:space:]]*- VERSION=[0-9]+[.][0-9]+[.][0-9]+/ {
152-
s/(VERSION=)[0-9]+[.][0-9]+[.][0-9]+/\1'"${full_version}"'/
153-
}
154-
}
155-
}
156-
' "$COMPOSE_FILE"
157146
}
158147

159148
# update specific service version
160149
update_service_version() {
161150
local service="$1"
162151
local version="$2"
163-
local full_version="${version}.0"
164152

165153
if [ -z "$service" ] || [ -z "$version" ]; then
166154
echo "Error: Service name and version number are required."
@@ -172,18 +160,20 @@ update_service_version() {
172160
s/(:v?)[^:]+$/\1${version}/
173161
}
174162
" "$COMPOSE_FILE"
163+
}
175164

176-
if [ "$service" = "swanlab-server" ]; then
177-
sed -i.bak -E "
178-
/^[[:space:]]*swanlab-server:/,/^$/ {
179-
/^[[:space:]]*environment:/,/^$/ {
180-
/^[[:space:]]*- VERSION=[0-9]+([.][0-9]+)*[.][0-9]+/ {
181-
s/(VERSION=)[0-9]+([.][0-9]+)*[.][0-9]+/\\1${full_version}/
182-
}
183-
}
184-
}
185-
" "$COMPOSE_FILE"
186-
fi
165+
# update self-hosted version
166+
update_self_hosted_version() {
167+
local full_version="$1"
168+
sed -i.bak -E "
169+
/^[[:space:]]*swanlab-server:/,/^$/ {
170+
/^[[:space:]]*environment:/,/^$/ {
171+
/^[[:space:]]*- VERSION=[0-9]+([.][0-9]+)*[.][0-9]+/ {
172+
s/(VERSION=)[0-9]+([.][0-9]+)*[.][0-9]+/\\1${full_version}/
173+
}
174+
}
175+
}
176+
" "$COMPOSE_FILE"
187177
}
188178

189179
# check docker-compose.yaml exists
@@ -198,10 +188,14 @@ read -p "Updating the container version will restart docker compose. Do you agre
198188
# # check y or Y
199189
if [[ "$confirm" == [yY] || "$confirm" == [yY][eE][sS] ]]; then
200190
echo "begin update"
191+
# 更新设置页面版本号
192+
update_self_hosted_version "2.3.1"
201193
# update all containers version
202194
update_version "2.3"
203195
update_service_version "swanlab-cloud" "2.3.1"
196+
update_service_version "swanlab-server" "2.3.1"
204197
update_service_version "fluent-bit" "3.1"
198+
update_service_version "traefik" "3.1"
205199

206200
# update DATABASE_URL_REPLICA
207201
if ! grep -q "DATABASE_URL_REPLICA" "$COMPOSE_FILE"; then
@@ -241,13 +235,29 @@ if [[ "$confirm" == [yY] || "$confirm" == [yY][eE][sS] ]]; then
241235
fi
242236
# add swanlab-server environment variable
243237
if ! grep -q "VERSION" "$COMPOSE_FILE"; then
244-
add_new_var "swanlab-server" "environment" "- VERSION=2.3.0"
238+
add_new_var "swanlab-server" "environment" "- VERSION=2.3.1"
245239
fi
246240

247241
# add missing minio middleware if needed
242+
if ! grep -q 'traefik.http.routers.minio3.rule=PathPrefix(`/swanlab-private`)' "$COMPOSE_FILE"; then
243+
add_new_var "minio" "labels" "- \"traefik.http.routers.minio3.rule=PathPrefix(\`/swanlab-private\`)\""
244+
fi
248245
if ! grep -q "traefik.http.routers.minio2.middlewares=minio-host@file" "$COMPOSE_FILE"; then
249246
add_new_var "minio" "labels" "- \"traefik.http.routers.minio2.middlewares=minio-host@file\""
250247
fi
248+
if ! grep -q 'traefik.http.routers.minio2.rule=PathPrefix(`/swanlab-private/exports`)' "$COMPOSE_FILE"; then
249+
add_new_var "minio" "labels" "- \"traefik.http.routers.minio2.rule=PathPrefix(\`/swanlab-private/exports\`)\""
250+
fi
251+
# delete old minio labels if exists
252+
if grep -q 'traefik.http.routers.minio2.rule=PathPrefix(`/swanlab-private`)' "$COMPOSE_FILE"; then
253+
sed -i.bak '\|traefik\.http\.routers\.minio2\.rule=PathPrefix(`/swanlab-private`)|d' "$COMPOSE_FILE"
254+
fi
255+
# delete minio ports mapping
256+
# 删除以 'ports:' 开头,并且下一行包含 9000:9000 的两行
257+
sed -i.bak '/^[[:space:]]*ports:[[:space:]]*$/{
258+
N
259+
/"9000:9000"/d
260+
}' "$COMPOSE_FILE"
251261
# add healthcheck for swanlab-cloud
252262
if ! grep -A 10 'swanlab-cloud:' "$COMPOSE_FILE" | grep -q '^ healthcheck:'; then
253263
add_health_check "swanlab-cloud" 80

scripts/pull-images.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
# 定义要下载的镜像列表
44
images=(
5-
"ccr.ccs.tencentyun.com/self-hosted/traefik:v3.0"
5+
"ccr.ccs.tencentyun.com/self-hosted/traefik:v3.1"
66
"ccr.ccs.tencentyun.com/self-hosted/postgres:16.1"
77
"ccr.ccs.tencentyun.com/self-hosted/redis-stack-server:7.2.0-v15"
88
"ccr.ccs.tencentyun.com/self-hosted/clickhouse:24.3"
99
"ccr.ccs.tencentyun.com/self-hosted/logrotate:v1"
1010
"ccr.ccs.tencentyun.com/self-hosted/fluent-bit:3.1"
1111
"ccr.ccs.tencentyun.com/self-hosted/minio:RELEASE.2025-02-28T09-55-16Z"
1212
"ccr.ccs.tencentyun.com/self-hosted/minio-mc:RELEASE.2025-04-08T15-39-49Z"
13-
"ccr.ccs.tencentyun.com/self-hosted/swanlab-server:v2.3"
13+
"ccr.ccs.tencentyun.com/self-hosted/swanlab-server:v2.3.1"
1414
"ccr.ccs.tencentyun.com/self-hosted/swanlab-house:v2.3"
1515
"ccr.ccs.tencentyun.com/self-hosted/swanlab-cloud:v2.3.1"
1616
"ccr.ccs.tencentyun.com/self-hosted/swanlab-next:v2.3"

0 commit comments

Comments
 (0)