chore: 调整 nginx 入口为 8888 端口

This commit is contained in:
Cheng Zhou
2026-03-31 09:34:29 +08:00
parent 9535fece6c
commit 84f865a7b0
8 changed files with 11 additions and 13 deletions
+3 -3
View File
@@ -10,8 +10,8 @@
- 默认无任何 demo 数据;生产初始化只确保固定管理员 `admin@huapont.cn / admin123` 存在
- 验证方式:
- `docker compose config`
- `curl -i http://127.0.0.1/`
- `curl -i http://127.0.0.1/health`
- `curl -i http://127.0.0.1:8888/`
- `curl -i http://127.0.0.1:8888/health`
## 账号与注册
- 初始化管理员:`admin@huapont.cn / admin123`(通过生产初始化命令显式创建)
@@ -28,7 +28,7 @@
- 普通成员(无项目角色):仅浏览
## 访问方式
- 前端:`http://localhost`
- 前端:`http://localhost:8888`
- 后端 API:同域 `/api/v1/*`
- `nginx` 负责托管前端静态资源,并将 `/api``/health` 转发到 `backend`
+1 -3
View File
@@ -57,9 +57,7 @@ services:
container_name: ctms_nginx
restart: always
ports:
- "80:80"
- "443:443"
- "8888:8888"
- "8888:80"
volumes:
- ./nginx/certs:/etc/nginx/certs:ro
- ./frontend/public/favicon.ico:/usr/share/nginx/html/favicon.ico:ro
+1 -1
View File
@@ -64,7 +64,7 @@
## 8. 冒烟脚本
- [ ] `cd backend && docker compose exec -T backend python scripts/smoke_setup_config.py`
- [ ] 使用 `BASE_URL/EMAIL/PASSWORD/STUDY_ID` 环境变量执行一次(覆盖指定项目)
- [ ] `BASE_URL=http://localhost EMAIL=... PASSWORD=... STUDY_ID=... bash docs/setup-config-curl-smoke.sh`
- [ ] `BASE_URL=http://localhost:8888 EMAIL=... PASSWORD=... STUDY_ID=... bash docs/setup-config-curl-smoke.sh`
- [ ] 导入并执行 Postman 集合 `docs/postman/setup-config.postman_collection.json`
## 9. 发布前确认
+1 -1
View File
@@ -186,7 +186,7 @@ Content-Type: multipart/form-data
- 使用方式:
```bash
chmod +x docs/setup-config-curl-smoke.sh
BASE_URL=http://localhost \
BASE_URL=http://localhost:8888 \
EMAIL=admin@example.com \
PASSWORD=admin123 \
STUDY_ID=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa \
@@ -103,8 +103,8 @@ Expected: PASS
**Step 3: Check HTTP endpoints**
Run: `curl -i http://127.0.0.1/`
Run: `curl -i http://127.0.0.1:8888/`
Expected: `200 OK` and HTML payload
Run: `curl -i http://127.0.0.1/health`
Run: `curl -i http://127.0.0.1:8888/health`
Expected: successful backend health response
@@ -1,7 +1,7 @@
{
"name": "CTMS Local Example",
"values": [
{ "key": "base_url", "value": "http://localhost", "type": "default", "enabled": true },
{ "key": "base_url", "value": "http://localhost:8888", "type": "default", "enabled": true },
{ "key": "email", "value": "admin@example.com", "type": "default", "enabled": true },
{ "key": "password", "value": "admin123", "type": "default", "enabled": true },
{ "key": "study_id", "value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "type": "default", "enabled": true },
@@ -189,7 +189,7 @@
}
],
"variable": [
{ "key": "base_url", "value": "http://localhost" },
{ "key": "base_url", "value": "http://localhost:8888" },
{ "key": "email", "value": "admin@example.com" },
{ "key": "password", "value": "admin123" },
{ "key": "study_id", "value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" },
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
BASE_URL="${BASE_URL:-http://localhost}"
BASE_URL="${BASE_URL:-http://localhost:8888}"
EMAIL="${EMAIL:-admin@example.com}"
PASSWORD="${PASSWORD:-admin123}"
STUDY_ID="${STUDY_ID:-aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa}"