chore: 默认端口改为 3030

- 更新 .env, .env.example, .env.production
- 避免与 3000 端口冲突
This commit is contained in:
饭团
2026-03-05 15:37:12 +08:00
parent 2bc5c7e0be
commit ff3ce48207
6 changed files with 1094 additions and 8 deletions

View File

@@ -16,17 +16,44 @@
### 2. 配置权限
在"权限管理"中添加以下权限:
在"权限管理"中添加以下权限(根据飞书开放平台实际权限代码)
**方式一:标准权限(推荐)**
| 权限 | 说明 |
|------|------|
| `im:message` | 发送和接收消息(包含文件消息) |
| `im:message` | 发送和接收消息 |
| `im:resource` | 访问消息中的资源(文件、图片等) |
| `contact:group:readonly` | 读取群组信息(可选) |
> **⚠️ 注意:** 飞书权限中没有 `im:file`,文件上传下载功能通过 `im:message` + `im:resource` 权限实现。
>
> 详细权限配置请查看 [`FEISHU_PERMISSIONS.md`](./FEISHU_PERMISSIONS.md)
**方式二:批量导出权限(如果显示以下权限)**
```json
{
"scopes": {
"tenant": [
"im:message:readonly",
"aily:file:read",
"aily:file:write",
"im:message"
],
"user": [
"aily:file:read",
"aily:file:write"
]
}
}
```
| 权限代码 | 说明 |
|---------|------|
| `im:message` | 发送消息 |
| `im:message:readonly` | 读取消息 |
| `aily:file:read` | 读取文件 |
| `aily:file:write` | 写入文件 |
> **💡 提示:** 不同飞书版本可能显示不同的权限代码,以上两种都可以使用。
详细权限配置请查看 [`FEISHU_PERMISSIONS.md`](./FEISHU_PERMISSIONS.md)
### 3. 配置事件订阅
@@ -97,6 +124,11 @@ docker run -d \
### 🌐 Nginx 反向代理(生产环境推荐)
**特点:**
- ✅ 不占用 80/443 端口Node.js 应用使用 3000 端口)
- ✅ 支持多域名部署(与其他应用共享 Nginx
- ✅ 支持 HTTPS 配置
详细配置请查看 [`NGINX.md`](./NGINX.md)
```bash
@@ -108,6 +140,32 @@ sudo nginx -t
sudo systemctl restart nginx
```
**Nginx 配置示例(多域名):**
```nginx
# 七牛云上传机器人
server {
listen 80;
server_name qiniu.your-domain.com; # 独立域名
location /feishu/event {
proxy_pass http://127.0.0.1:3000/feishu/event;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
# 其他应用
server {
listen 80;
server_name other.your-domain.com;
location / {
proxy_pass http://127.0.0.1:4000;
}
}
```
---
## ⚙️ 配置