feat(topology): add GHC06 layout and deploy docs
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
topology-api:
|
||||
image: topology-api:20260721-ghc06-layout
|
||||
container_name: topology-api-2
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
ports:
|
||||
- "38080:8080"
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- python
|
||||
- -c
|
||||
- >-
|
||||
import urllib.request;
|
||||
urllib.request.urlopen('http://127.0.0.1:8080/health', timeout=3)
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
@@ -0,0 +1,46 @@
|
||||
# topology-api NAS 部署
|
||||
|
||||
镜像文件:`topology-api-20260721-ghc06-layout.tar`
|
||||
|
||||
## 1. 导入镜像
|
||||
|
||||
```bash
|
||||
docker load -i topology-api-20260721-ghc06-layout.tar
|
||||
```
|
||||
|
||||
预期镜像标签:`topology-api:20260721-ghc06-layout`
|
||||
|
||||
## 2. 保留旧容器并启动新容器
|
||||
|
||||
在包含现有生产 `.env` 的目录执行:
|
||||
|
||||
```bash
|
||||
docker stop topology-api-2
|
||||
docker rename topology-api-2 topology-api-2-backup-20260721
|
||||
|
||||
docker run -d \
|
||||
--name topology-api-2 \
|
||||
--restart unless-stopped \
|
||||
--env-file .env \
|
||||
-p 38080:8080 \
|
||||
topology-api:20260721-ghc06-layout
|
||||
```
|
||||
|
||||
## 3. 验证
|
||||
|
||||
```bash
|
||||
curl -fsS http://127.0.0.1:38080/health
|
||||
docker ps --filter name=topology-api-2
|
||||
docker logs --tail 50 topology-api-2
|
||||
```
|
||||
|
||||
## 4. 回滚
|
||||
|
||||
```bash
|
||||
docker stop topology-api-2
|
||||
docker rm topology-api-2
|
||||
docker rename topology-api-2-backup-20260721 topology-api-2
|
||||
docker start topology-api-2
|
||||
```
|
||||
|
||||
确认新版本稳定前,不要删除备份容器或旧镜像。不要重新运行 seed 脚本。
|
||||
Reference in New Issue
Block a user