@lobehub/chat 1.114.2 → 1.114.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/desktop-pr-build.yml +8 -0
- package/.github/workflows/release-desktop-beta.yml +8 -0
- package/CHANGELOG.md +17 -0
- package/apps/desktop/electron-builder.js +1 -1
- package/changelog/v1.json +5 -0
- package/docs/development/basic/image-generation-setup.mdx +190 -0
- package/docs/development/basic/image-generation-setup.zh-CN.mdx +190 -0
- package/package.json +1 -1
- package/scripts/setup-image-generation-dev.sh +81 -0
@@ -183,6 +183,10 @@ jobs:
|
|
183
183
|
apps/desktop/release/*.zip*
|
184
184
|
apps/desktop/release/*.exe*
|
185
185
|
apps/desktop/release/*.AppImage
|
186
|
+
apps/desktop/release/*.deb*
|
187
|
+
apps/desktop/release/*.snap*
|
188
|
+
apps/desktop/release/*.rpm*
|
189
|
+
apps/desktop/release/*.tar.gz*
|
186
190
|
retention-days: 5
|
187
191
|
|
188
192
|
publish-pr:
|
@@ -245,6 +249,10 @@ jobs:
|
|
245
249
|
release/*.zip*
|
246
250
|
release/*.exe*
|
247
251
|
release/*.AppImage
|
252
|
+
release/*.deb*
|
253
|
+
release/*.snap*
|
254
|
+
release/*.rpm*
|
255
|
+
release/*.tar.gz*
|
248
256
|
env:
|
249
257
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
250
258
|
|
@@ -165,6 +165,10 @@ jobs:
|
|
165
165
|
apps/desktop/release/*.zip*
|
166
166
|
apps/desktop/release/*.exe*
|
167
167
|
apps/desktop/release/*.AppImage
|
168
|
+
apps/desktop/release/*.deb*
|
169
|
+
apps/desktop/release/*.snap*
|
170
|
+
apps/desktop/release/*.rpm*
|
171
|
+
apps/desktop/release/*.tar.gz*
|
168
172
|
retention-days: 5
|
169
173
|
|
170
174
|
# 正式版发布 job
|
@@ -201,5 +205,9 @@ jobs:
|
|
201
205
|
release/*.zip*
|
202
206
|
release/*.exe*
|
203
207
|
release/*.AppImage
|
208
|
+
release/*.deb*
|
209
|
+
release/*.snap*
|
210
|
+
release/*.rpm*
|
211
|
+
release/*.tar.gz*
|
204
212
|
env:
|
205
213
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,23 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.114.3](https://github.com/lobehub/lobe-chat/compare/v1.114.2...v1.114.3)
|
6
|
+
|
7
|
+
<sup>Released on **2025-08-21**</sup>
|
8
|
+
|
9
|
+
<br/>
|
10
|
+
|
11
|
+
<details>
|
12
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
13
|
+
|
14
|
+
</details>
|
15
|
+
|
16
|
+
<div align="right">
|
17
|
+
|
18
|
+
[](#readme-top)
|
19
|
+
|
20
|
+
</div>
|
21
|
+
|
5
22
|
### [Version 1.114.2](https://github.com/lobehub/lobe-chat/compare/v1.114.1...v1.114.2)
|
6
23
|
|
7
24
|
<sup>Released on **2025-08-21**</sup>
|
package/changelog/v1.json
CHANGED
@@ -0,0 +1,190 @@
|
|
1
|
+
---
|
2
|
+
title: Image Generation Development Setup
|
3
|
+
description: Configure local environment for developing text-to-image and image-to-image features
|
4
|
+
---
|
5
|
+
|
6
|
+
# Image Generation Development Setup
|
7
|
+
|
8
|
+
This guide helps developers set up the local environment for developing image generation features (text-to-image, image-to-image) with file storage capabilities.
|
9
|
+
|
10
|
+
## Prerequisites
|
11
|
+
|
12
|
+
- Docker installed and running
|
13
|
+
- Node.js and pnpm installed
|
14
|
+
- PostgreSQL client tools (optional, for debugging)
|
15
|
+
|
16
|
+
<Callout type="warning">
|
17
|
+
**Security Notice**: This setup is designed for local development only. It uses default credentials and open permissions that are NOT suitable for production environments.
|
18
|
+
</Callout>
|
19
|
+
|
20
|
+
## Quick Setup
|
21
|
+
|
22
|
+
Run the provided script to automatically set up all required services:
|
23
|
+
|
24
|
+
```bash
|
25
|
+
# Set up PostgreSQL and MinIO for image storage
|
26
|
+
./scripts/setup-image-generation-dev.sh
|
27
|
+
|
28
|
+
# Start the development server
|
29
|
+
pnpm dev:desktop
|
30
|
+
```
|
31
|
+
|
32
|
+
This script will:
|
33
|
+
|
34
|
+
1. Start PostgreSQL (no authentication for local development)
|
35
|
+
2. Run database migrations to initialize schema
|
36
|
+
3. Start MinIO (S3-compatible storage)
|
37
|
+
4. Create and configure the storage bucket
|
38
|
+
5. Add necessary S3 environment variables to `.env.desktop`
|
39
|
+
|
40
|
+
## Architecture Overview
|
41
|
+
|
42
|
+
The image generation feature requires:
|
43
|
+
|
44
|
+
- **PostgreSQL**: Stores metadata about generated images
|
45
|
+
- **MinIO/S3**: Stores the actual image files
|
46
|
+
- **Server Mode**: Required for file handling (`NEXT_PUBLIC_SERVICE_MODE=server`)
|
47
|
+
|
48
|
+
## Environment Configuration
|
49
|
+
|
50
|
+
The following environment variables are automatically configured by the setup script:
|
51
|
+
|
52
|
+
```bash
|
53
|
+
# S3 Storage Configuration (MinIO for local development)
|
54
|
+
S3_ACCESS_KEY_ID=minioadmin
|
55
|
+
S3_SECRET_ACCESS_KEY=minioadmin
|
56
|
+
S3_ENDPOINT=http://localhost:9000
|
57
|
+
S3_BUCKET=lobe-chat
|
58
|
+
S3_REGION=us-east-1
|
59
|
+
S3_PUBLIC_DOMAIN=http://localhost:9000/lobe-chat
|
60
|
+
S3_ENABLE_PATH_STYLE=1 # Required for MinIO
|
61
|
+
```
|
62
|
+
|
63
|
+
## Development Workflow
|
64
|
+
|
65
|
+
### 1. Image Generation API
|
66
|
+
|
67
|
+
When developing image generation features, generated images will be:
|
68
|
+
|
69
|
+
1. Created by the AI model
|
70
|
+
2. Uploaded to S3/MinIO via presigned URLs
|
71
|
+
3. Metadata stored in PostgreSQL
|
72
|
+
4. Served via the public S3 URL
|
73
|
+
|
74
|
+
### 2. File Storage Structure
|
75
|
+
|
76
|
+
```
|
77
|
+
lobe-chat/ # S3 Bucket
|
78
|
+
├── generated/ # Generated images
|
79
|
+
│ └── {userId}/
|
80
|
+
│ └── {sessionId}/
|
81
|
+
│ └── {imageId}.png
|
82
|
+
└── uploads/ # User uploads for image-to-image
|
83
|
+
└── {userId}/
|
84
|
+
└── {fileId}.{ext}
|
85
|
+
```
|
86
|
+
|
87
|
+
### 3. Testing Your Implementation
|
88
|
+
|
89
|
+
After setting up the environment, you can test:
|
90
|
+
|
91
|
+
```typescript
|
92
|
+
// Example: Upload generated image
|
93
|
+
const uploadUrl = await trpc.upload.createPresignedUrl.mutate({
|
94
|
+
filename: 'generated-image.png',
|
95
|
+
contentType: 'image/png',
|
96
|
+
});
|
97
|
+
|
98
|
+
// Upload to S3
|
99
|
+
await fetch(uploadUrl, {
|
100
|
+
method: 'PUT',
|
101
|
+
body: imageBlob,
|
102
|
+
headers: { 'Content-Type': 'image/png' },
|
103
|
+
});
|
104
|
+
```
|
105
|
+
|
106
|
+
## Manual Setup
|
107
|
+
|
108
|
+
If you prefer to set up services manually:
|
109
|
+
|
110
|
+
### PostgreSQL
|
111
|
+
|
112
|
+
```bash
|
113
|
+
docker run -d --name lobe-postgres \
|
114
|
+
-p 5432:5432 \
|
115
|
+
-e POSTGRES_HOST_AUTH_METHOD=trust \
|
116
|
+
-e POSTGRES_DB=postgres \
|
117
|
+
postgres:15
|
118
|
+
```
|
119
|
+
|
120
|
+
### MinIO
|
121
|
+
|
122
|
+
```bash
|
123
|
+
# Start MinIO
|
124
|
+
docker run -d --name lobe-minio \
|
125
|
+
-p 9000:9000 -p 9001:9001 \
|
126
|
+
-e MINIO_ROOT_USER=minioadmin \
|
127
|
+
-e MINIO_ROOT_PASSWORD=minioadmin \
|
128
|
+
quay.io/minio/minio:RELEASE.2025-04-22T22-12-26Z \
|
129
|
+
server /data --console-address ":9001"
|
130
|
+
|
131
|
+
# Create bucket
|
132
|
+
docker run --rm \
|
133
|
+
--link lobe-minio:minio \
|
134
|
+
--entrypoint bash \
|
135
|
+
quay.io/minio/mc:RELEASE.2025-04-18T16-45-00Z \
|
136
|
+
-c "
|
137
|
+
mc config host add minio http://minio:9000 minioadmin minioadmin &&
|
138
|
+
mc mb minio/lobe-chat &&
|
139
|
+
mc anonymous set public minio/lobe-chat
|
140
|
+
"
|
141
|
+
```
|
142
|
+
|
143
|
+
## Service URLs
|
144
|
+
|
145
|
+
- **PostgreSQL**: `postgres://postgres@localhost:5432/postgres`
|
146
|
+
- **MinIO API**: `http://localhost:9000`
|
147
|
+
- **MinIO Console**: `http://localhost:9001` (minioadmin/minioadmin)
|
148
|
+
- **Application**: `http://localhost:3015`
|
149
|
+
|
150
|
+
## Troubleshooting
|
151
|
+
|
152
|
+
### Port Conflicts
|
153
|
+
|
154
|
+
If ports are already in use:
|
155
|
+
|
156
|
+
```bash
|
157
|
+
# Check what's using the ports
|
158
|
+
lsof -i :5432 # PostgreSQL
|
159
|
+
lsof -i :9000 # MinIO API
|
160
|
+
lsof -i :9001 # MinIO Console
|
161
|
+
```
|
162
|
+
|
163
|
+
### Reset Environment
|
164
|
+
|
165
|
+
To completely reset your development environment:
|
166
|
+
|
167
|
+
```bash
|
168
|
+
# Stop and remove containers
|
169
|
+
docker stop lobe-postgres lobe-minio
|
170
|
+
docker rm lobe-postgres lobe-minio
|
171
|
+
|
172
|
+
# Re-run setup
|
173
|
+
./scripts/setup-image-generation-dev.sh
|
174
|
+
```
|
175
|
+
|
176
|
+
### Database Migrations
|
177
|
+
|
178
|
+
The setup script runs migrations automatically. If you need to run them manually:
|
179
|
+
|
180
|
+
```bash
|
181
|
+
pnpm db:migrate
|
182
|
+
```
|
183
|
+
|
184
|
+
Note: In development mode with `pnpm dev:desktop`, migrations also run automatically on startup.
|
185
|
+
|
186
|
+
## Related Documentation
|
187
|
+
|
188
|
+
- [Server Database Setup](/docs/self-hosting/server-database)
|
189
|
+
- [S3 Storage Configuration](/docs/self-hosting/advanced/s3)
|
190
|
+
- [Environment Variables](/docs/self-hosting/environment-variables)
|
@@ -0,0 +1,190 @@
|
|
1
|
+
---
|
2
|
+
title: 图像生成开发环境配置
|
3
|
+
description: 配置本地环境以开发文本生图和图像处理功能
|
4
|
+
---
|
5
|
+
|
6
|
+
# 图像生成开发环境配置
|
7
|
+
|
8
|
+
本指南帮助开发者配置本地环境,用于开发图像生成功能(文生图、图生图)等和文件存储能力。
|
9
|
+
|
10
|
+
## 前置条件
|
11
|
+
|
12
|
+
- 已安装并运行 Docker
|
13
|
+
- 已安装 Node.js 和 pnpm
|
14
|
+
- PostgreSQL 客户端工具(可选,用于调试)
|
15
|
+
|
16
|
+
<Callout type="warning">
|
17
|
+
**安全提醒**:此配置仅适用于本地开发。使用的默认凭据和开放权限不适合生产环境。
|
18
|
+
</Callout>
|
19
|
+
|
20
|
+
## 快速配置
|
21
|
+
|
22
|
+
运行提供的脚本来自动配置所有必需的服务:
|
23
|
+
|
24
|
+
```bash
|
25
|
+
# 配置 PostgreSQL 和 MinIO 用于图像存储
|
26
|
+
./scripts/setup-image-generation-dev.sh
|
27
|
+
|
28
|
+
# 启动开发服务器
|
29
|
+
pnpm dev:desktop
|
30
|
+
```
|
31
|
+
|
32
|
+
此脚本将执行:
|
33
|
+
|
34
|
+
1. 启动 PostgreSQL(本地开发无需身份验证)
|
35
|
+
2. 运行数据库迁移以初始化模式
|
36
|
+
3. 启动 MinIO(S3 兼容存储)
|
37
|
+
4. 创建并配置存储桶
|
38
|
+
5. 在 `.env.desktop` 中添加必要的 S3 环境变量
|
39
|
+
|
40
|
+
## 架构概览
|
41
|
+
|
42
|
+
图像生成功能需要:
|
43
|
+
|
44
|
+
- **PostgreSQL**:存储生成图像的元数据
|
45
|
+
- **MinIO/S3**:存储实际的图像文件
|
46
|
+
- **服务器模式**:文件处理所需(`NEXT_PUBLIC_SERVICE_MODE=server`)
|
47
|
+
|
48
|
+
## 环境配置
|
49
|
+
|
50
|
+
以下环境变量会被配置脚本自动设置:
|
51
|
+
|
52
|
+
```bash
|
53
|
+
# S3 存储配置(本地开发使用 MinIO)
|
54
|
+
S3_ACCESS_KEY_ID=minioadmin
|
55
|
+
S3_SECRET_ACCESS_KEY=minioadmin
|
56
|
+
S3_ENDPOINT=http://localhost:9000
|
57
|
+
S3_BUCKET=lobe-chat
|
58
|
+
S3_REGION=us-east-1
|
59
|
+
S3_PUBLIC_DOMAIN=http://localhost:9000/lobe-chat
|
60
|
+
S3_ENABLE_PATH_STYLE=1 # MinIO 必需
|
61
|
+
```
|
62
|
+
|
63
|
+
## 开发工作流
|
64
|
+
|
65
|
+
### 1. 图像生成 API
|
66
|
+
|
67
|
+
在开发图像生成功能时,生成的图像将:
|
68
|
+
|
69
|
+
1. 由 AI 模型创建
|
70
|
+
2. 通过预签名 URL 上传到 S3/MinIO
|
71
|
+
3. 元数据存储在 PostgreSQL 中
|
72
|
+
4. 通过公共 S3 URL 提供服务
|
73
|
+
|
74
|
+
### 2. 文件存储结构
|
75
|
+
|
76
|
+
```
|
77
|
+
lobe-chat/ # S3 存储桶
|
78
|
+
├── generated/ # 生成的图像
|
79
|
+
│ └── {userId}/
|
80
|
+
│ └── {sessionId}/
|
81
|
+
│ └── {imageId}.png
|
82
|
+
└── uploads/ # 用户上传的图像处理文件
|
83
|
+
└── {userId}/
|
84
|
+
└── {fileId}.{ext}
|
85
|
+
```
|
86
|
+
|
87
|
+
### 3. 测试您的实现
|
88
|
+
|
89
|
+
配置环境后,您可以测试:
|
90
|
+
|
91
|
+
```typescript
|
92
|
+
// 示例:上传生成的图像
|
93
|
+
const uploadUrl = await trpc.upload.createPresignedUrl.mutate({
|
94
|
+
filename: 'generated-image.png',
|
95
|
+
contentType: 'image/png',
|
96
|
+
});
|
97
|
+
|
98
|
+
// 上传到 S3
|
99
|
+
await fetch(uploadUrl, {
|
100
|
+
method: 'PUT',
|
101
|
+
body: imageBlob,
|
102
|
+
headers: { 'Content-Type': 'image/png' },
|
103
|
+
});
|
104
|
+
```
|
105
|
+
|
106
|
+
## 手动配置
|
107
|
+
|
108
|
+
如果您希望手动配置服务:
|
109
|
+
|
110
|
+
### PostgreSQL
|
111
|
+
|
112
|
+
```bash
|
113
|
+
docker run -d --name lobe-postgres \
|
114
|
+
-p 5432:5432 \
|
115
|
+
-e POSTGRES_HOST_AUTH_METHOD=trust \
|
116
|
+
-e POSTGRES_DB=postgres \
|
117
|
+
postgres:15
|
118
|
+
```
|
119
|
+
|
120
|
+
### MinIO
|
121
|
+
|
122
|
+
```bash
|
123
|
+
# 启动 MinIO
|
124
|
+
docker run -d --name lobe-minio \
|
125
|
+
-p 9000:9000 -p 9001:9001 \
|
126
|
+
-e MINIO_ROOT_USER=minioadmin \
|
127
|
+
-e MINIO_ROOT_PASSWORD=minioadmin \
|
128
|
+
quay.io/minio/minio:RELEASE.2025-04-22T22-12-26Z \
|
129
|
+
server /data --console-address ":9001"
|
130
|
+
|
131
|
+
# 创建存储桶
|
132
|
+
docker run --rm \
|
133
|
+
--link lobe-minio:minio \
|
134
|
+
--entrypoint bash \
|
135
|
+
quay.io/minio/mc:RELEASE.2025-04-18T16-45-00Z \
|
136
|
+
-c "
|
137
|
+
mc config host add minio http://minio:9000 minioadmin minioadmin &&
|
138
|
+
mc mb minio/lobe-chat &&
|
139
|
+
mc anonymous set public minio/lobe-chat
|
140
|
+
"
|
141
|
+
```
|
142
|
+
|
143
|
+
## 服务地址
|
144
|
+
|
145
|
+
- **PostgreSQL**:`postgres://postgres@localhost:5432/postgres`
|
146
|
+
- **MinIO API**:`http://localhost:9000`
|
147
|
+
- **MinIO 控制台**:`http://localhost:9001` (minioadmin/minioadmin)
|
148
|
+
- **应用程序**:`http://localhost:3015`
|
149
|
+
|
150
|
+
## 故障排除
|
151
|
+
|
152
|
+
### 端口冲突
|
153
|
+
|
154
|
+
如果端口已被占用:
|
155
|
+
|
156
|
+
```bash
|
157
|
+
# 检查端口使用情况
|
158
|
+
lsof -i :5432 # PostgreSQL
|
159
|
+
lsof -i :9000 # MinIO API
|
160
|
+
lsof -i :9001 # MinIO 控制台
|
161
|
+
```
|
162
|
+
|
163
|
+
### 重置环境
|
164
|
+
|
165
|
+
要完全重置开发环境:
|
166
|
+
|
167
|
+
```bash
|
168
|
+
# 停止并删除容器
|
169
|
+
docker stop lobe-postgres lobe-minio
|
170
|
+
docker rm lobe-postgres lobe-minio
|
171
|
+
|
172
|
+
# 重新运行配置
|
173
|
+
./scripts/setup-image-generation-dev.sh
|
174
|
+
```
|
175
|
+
|
176
|
+
### 数据库迁移
|
177
|
+
|
178
|
+
配置脚本会自动运行迁移。如需手动运行:
|
179
|
+
|
180
|
+
```bash
|
181
|
+
pnpm db:migrate
|
182
|
+
```
|
183
|
+
|
184
|
+
注意:在使用 `pnpm dev:desktop` 的开发模式下,迁移也会在启动时自动运行。
|
185
|
+
|
186
|
+
## 相关文档
|
187
|
+
|
188
|
+
- [服务器数据库配置](/docs/self-hosting/server-database)
|
189
|
+
- [S3 存储配置](/docs/self-hosting/advanced/s3)
|
190
|
+
- [环境变量](/docs/self-hosting/environment-variables)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.114.
|
3
|
+
"version": "1.114.3",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -0,0 +1,81 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
echo "🚀 Setting up image upload development environment..."
|
4
|
+
|
5
|
+
# 1. 设置 PostgreSQL (无密码本地开发)
|
6
|
+
echo "Step 1: Setting up PostgreSQL..."
|
7
|
+
docker stop lobe-postgres 2>/dev/null && docker rm lobe-postgres 2>/dev/null
|
8
|
+
docker run -d --name lobe-postgres \
|
9
|
+
-p 5432:5432 \
|
10
|
+
-e POSTGRES_HOST_AUTH_METHOD=trust \
|
11
|
+
-e POSTGRES_DB=postgres \
|
12
|
+
postgres:15
|
13
|
+
|
14
|
+
echo "Waiting for PostgreSQL to start..."
|
15
|
+
sleep 10
|
16
|
+
|
17
|
+
# 运行数据库迁移
|
18
|
+
echo "Running database migrations..."
|
19
|
+
pnpm db:migrate
|
20
|
+
|
21
|
+
# 2. 启动 MinIO
|
22
|
+
echo ""
|
23
|
+
echo "Step 2: Starting MinIO..."
|
24
|
+
docker stop lobe-minio 2>/dev/null && docker rm lobe-minio 2>/dev/null
|
25
|
+
docker run -d --name lobe-minio \
|
26
|
+
-p 9000:9000 -p 9001:9001 \
|
27
|
+
-e MINIO_ROOT_USER=minioadmin \
|
28
|
+
-e MINIO_ROOT_PASSWORD=minioadmin \
|
29
|
+
quay.io/minio/minio:RELEASE.2025-04-22T22-12-26Z server /data --console-address ":9001"
|
30
|
+
|
31
|
+
# 3. 等待 MinIO 启动
|
32
|
+
echo "Waiting for MinIO to start..."
|
33
|
+
sleep 10
|
34
|
+
|
35
|
+
# 4. 创建 bucket 并设置权限
|
36
|
+
echo "Creating bucket and setting permissions..."
|
37
|
+
docker run --rm \
|
38
|
+
--link lobe-minio:minio \
|
39
|
+
--entrypoint bash \
|
40
|
+
quay.io/minio/mc:RELEASE.2025-04-18T16-45-00Z \
|
41
|
+
-c "
|
42
|
+
mc config host add minio http://minio:9000 minioadmin minioadmin
|
43
|
+
mb_output=\$(mc mb minio/lobe-chat 2>&1)
|
44
|
+
mb_exit=\$?
|
45
|
+
if [ \$mb_exit -ne 0 ]; then
|
46
|
+
echo \"\$mb_output\" | grep -q 'Bucket already exists' || { echo \"Failed to create bucket: \$mb_output\"; exit \$mb_exit; }
|
47
|
+
fi
|
48
|
+
mc anonymous set public minio/lobe-chat
|
49
|
+
"
|
50
|
+
|
51
|
+
# 5. 检查并添加 S3 配置
|
52
|
+
if [ ! -f .env.desktop ]; then
|
53
|
+
echo "Creating .env.desktop from .env.example..."
|
54
|
+
cp .env.example .env.desktop
|
55
|
+
fi
|
56
|
+
|
57
|
+
if ! grep -q "S3_ACCESS_KEY_ID" .env.desktop 2>/dev/null; then
|
58
|
+
echo ""
|
59
|
+
echo "Adding S3 configuration to .env.desktop..."
|
60
|
+
echo "" >> .env.desktop
|
61
|
+
echo "# Image Upload Configuration (added by setup-image-dev.sh)" >> .env.desktop
|
62
|
+
echo "S3_ACCESS_KEY_ID=minioadmin" >> .env.desktop
|
63
|
+
echo "S3_SECRET_ACCESS_KEY=minioadmin" >> .env.desktop
|
64
|
+
echo "S3_ENDPOINT=http://localhost:9000" >> .env.desktop
|
65
|
+
echo "S3_BUCKET=lobe-chat" >> .env.desktop
|
66
|
+
echo "S3_REGION=us-east-1" >> .env.desktop
|
67
|
+
echo "S3_PUBLIC_DOMAIN=http://localhost:9000/lobe-chat" >> .env.desktop
|
68
|
+
echo "S3_ENABLE_PATH_STYLE=1" >> .env.desktop
|
69
|
+
else
|
70
|
+
echo "S3 configuration already exists in .env.desktop"
|
71
|
+
fi
|
72
|
+
|
73
|
+
echo ""
|
74
|
+
echo "✅ Image development environment ready!"
|
75
|
+
echo ""
|
76
|
+
echo "Services running:"
|
77
|
+
echo " - PostgreSQL: postgres://postgres@localhost:5432/postgres (no password)"
|
78
|
+
echo " - MinIO S3: http://localhost:9000"
|
79
|
+
echo " - MinIO Console: http://localhost:9001 (minioadmin/minioadmin)"
|
80
|
+
echo ""
|
81
|
+
echo "Next step: pnpm dev:desktop"
|