Showing
2 changed files
with
48 additions
and
206 deletions
| @@ -206,124 +206,44 @@ Weibo_PublicOpinion_AnalysisSystem/ | @@ -206,124 +206,44 @@ Weibo_PublicOpinion_AnalysisSystem/ | ||
| 206 | 206 | ||
| 207 | ## 🚀 Quick Start | 207 | ## 🚀 Quick Start |
| 208 | 208 | ||
| 209 | -### 1. 🐳 Pulling the Docker Image | 209 | +### 1. Starting the Project |
| 210 | 210 | ||
| 211 | +This project utilizes `docker compose` for managing and running multiple services. | ||
| 211 | 212 | ||
| 213 | +1. **Locate File:** Navigate to the directory containing the provided `docker-compose.yml` file. | ||
| 212 | 214 | ||
| 213 | -You can view all available versions of the BettaFish Docker image on the GitHub Container Registry (GHCR) here: | 215 | +2. **Run Command:** Execute the following command to start all services in the **background**: |
| 214 | 216 | ||
| 215 | -https://github.com/666ghj/BettaFish/pkgs/container/bettafish | 217 | + ```bash |
| 218 | + docker compose up -d | ||
| 219 | + ``` | ||
| 216 | 220 | ||
| 217 | -Use the following command to pull the image: | 221 | + > **⚠️ Note: Slow Image Pull** |
| 218 | 222 | ||
| 219 | -Bash | 223 | + > If you encounter slow image pulling speeds, you can modify the `image` field under the corresponding service in the `docker-compose.yml` file to use an alternative image source. |
| 220 | 224 | ||
| 221 | -``` | ||
| 222 | -docker pull ghcr.io/666ghj/bettafish:latest | ||
| 223 | -``` | ||
| 224 | - | ||
| 225 | -> ⚠️ **Note:** If the pull speed is slow, you can try replacing the registry address `ghcr.io` with `ghcr.nju.edu.cn` for faster download: | ||
| 226 | -> | ||
| 227 | -> Bash | ||
| 228 | -> | ||
| 229 | -> ``` | ||
| 230 | -> docker pull ghcr.nju.edu.cn/666ghj/bettafish:latest | ||
| 231 | -> ``` | ||
| 232 | - | ||
| 233 | - | ||
| 234 | - | ||
| 235 | -### 2. 🚀 Running with Docker Compose | ||
| 236 | - | ||
| 237 | - | ||
| 238 | - | ||
| 239 | -After pulling the image, you need to use the provided `docker-compose.yml` file to start the service. | ||
| 240 | - | ||
| 241 | - | ||
| 242 | - | ||
| 243 | -#### A. Modifying `docker-compose.yml` | ||
| 244 | - | ||
| 245 | - | ||
| 246 | - | ||
| 247 | -Open the `docker-compose.yml` file in your project and modify the `image` field under the `bettafish` service. Replace its value with the **full name of the image** you just pulled. | ||
| 248 | - | ||
| 249 | -**Example:** | ||
| 250 | - | ||
| 251 | -Change the original configuration: | ||
| 252 | - | ||
| 253 | -YAML | ||
| 254 | - | ||
| 255 | -``` | ||
| 256 | -services: | ||
| 257 | - bettafish: | ||
| 258 | - build: | ||
| 259 | - context: . | ||
| 260 | - dockerfile: Dockerfile | ||
| 261 | - image: bettafish:latest # <-- Replace this image name with the one you pulled | ||
| 262 | - container_name: bettafish | ||
| 263 | -# ... other configurations | ||
| 264 | -``` | ||
| 265 | - | ||
| 266 | -To (using `ghcr.io/666ghj/bettafish:latest` as an example: | ||
| 267 | - | ||
| 268 | -YAML | ||
| 269 | - | ||
| 270 | -``` | ||
| 271 | -services: | ||
| 272 | - bettafish: | ||
| 273 | - image: ghcr.io/666ghj/bettafish:latest # <-- Replace with the image name you pulled | ||
| 274 | - container_name: bettafish | ||
| 275 | -# ... other configurations | ||
| 276 | -``` | ||
| 277 | - | ||
| 278 | - | ||
| 279 | - | ||
| 280 | -#### B. Starting the Service | ||
| 281 | - | ||
| 282 | - | ||
| 283 | - | ||
| 284 | -In the directory containing the modified `docker-compose.yml` file, execute the following command to start the service: | ||
| 285 | - | ||
| 286 | -Bash | ||
| 287 | - | ||
| 288 | -``` | ||
| 289 | -docker compose up -d | ||
| 290 | -``` | ||
| 291 | - | ||
| 292 | - | ||
| 293 | - | ||
| 294 | -### 3. ⚙️ System Configuration (Database and Models) | ||
| 295 | - | ||
| 296 | - | ||
| 297 | - | ||
| 298 | -After the service starts, you need to configure the system. | ||
| 299 | - | ||
| 300 | - | ||
| 301 | - | ||
| 302 | -#### A. Database Configuration | ||
| 303 | - | ||
| 304 | - | ||
| 305 | - | ||
| 306 | -Please configure the database connection with the following parameters: | ||
| 307 | - | ||
| 308 | -| **Parameter** | **Value** | **Description** | | ||
| 309 | -| --------------- | ----------- | --------------------------------------------------- | | ||
| 310 | -| **DB_HOST** | `db` | Database service name (in `docker-compose` network) | | ||
| 311 | -| **DB_PORT** | `5432` | Database port (PostgreSQL default) | | ||
| 312 | -| **DB_USER** | `bettafish` | Database username | | ||
| 313 | -| **DB_PASSWORD** | `bettafish` | Database password | | ||
| 314 | -| **DB_NAME** | `bettafish` | Database name | | ||
| 315 | - | ||
| 316 | -> **Tip:** You should **keep the default values** for any other database-related parameters. | 225 | + > In the original `docker-compose.yml` file, we have provided alternative (or mirror) image addresses as **comments** for you to replace with. |
| 317 | 226 | ||
| 227 | +### 2. Configuration Instructions | ||
| 318 | 228 | ||
| 229 | +#### Database Configuration | ||
| 319 | 230 | ||
| 320 | -#### B. Large Language Model (LLM) Configuration | 231 | +Please configure the database connection information with the following parameters: |
| 321 | 232 | ||
| 233 | +| Configuration Item | Value to Use | Description | | ||
| 234 | +| :--- | :--- | :--- | | ||
| 235 | +| `DB_HOST` | `db` | Database service name (as defined in `docker-compose.yml`) | | ||
| 236 | +| `DB_PORT` | `5432` | Default PostgreSQL port | | ||
| 237 | +| `DB_USER` | `bettafish` | Database username | | ||
| 238 | +| `DB_PASSWORD` | `bettafish` | Database password | | ||
| 239 | +| `DB_NAME` | `bettafish` | Database name | | ||
| 240 | +| **Others** | **Keep Default** | Please keep other parameters, such as database connection pool settings, at their default values. | | ||
| 322 | 241 | ||
| 242 | +### Large Language Model (LLM) Configuration | ||
| 323 | 243 | ||
| 324 | -After completing the database configuration, proceed to configure all the Large Language Model related parameters that you intend to use. | 244 | +After completing the database configuration, please proceed to configure **all Large Language Model related parameters** to ensure the system can connect to your chosen LLM service. |
| 325 | 245 | ||
| 326 | -Once the configuration is complete, the system should start and run normally. | 246 | +Upon completing and saving all the configurations above, the system should be ready to run normally. |
| 327 | 247 | ||
| 328 | 248 | ||
| 329 | ## 💻 ⚙️ Source Code Startup Guide | 249 | ## 💻 ⚙️ Source Code Startup Guide |
| @@ -206,122 +206,44 @@ Weibo_PublicOpinion_AnalysisSystem/ | @@ -206,122 +206,44 @@ Weibo_PublicOpinion_AnalysisSystem/ | ||
| 206 | 206 | ||
| 207 | ## 🚀 快速开始(docker) | 207 | ## 🚀 快速开始(docker) |
| 208 | 208 | ||
| 209 | -### 1. 🐳 拉取 Docker 镜像 | 209 | +### 1. 启动项目 |
| 210 | 210 | ||
| 211 | +本项目使用 `docker compose` 进行多服务管理和运行。 | ||
| 211 | 212 | ||
| 213 | +1. **定位文件:** 切换到包含项目提供的 `docker-compose.yml` 文件的目录下。 | ||
| 212 | 214 | ||
| 213 | -您可以从 GitHub Container Registry (GHCR) 查看所有可用的 BettaFish Docker 镜像版本,请访问: | 215 | +2. **运行命令:** 执行以下命令在**后台**启动所有服务: |
| 214 | 216 | ||
| 215 | -https://github.com/666ghj/BettaFish/pkgs/container/bettafish | 217 | + ```bash |
| 218 | + docker compose up -d | ||
| 219 | + ``` | ||
| 216 | 220 | ||
| 217 | -使用以下命令拉取镜像: | 221 | + > **⚠️ 注意:镜像拉取速度慢** |
| 218 | 222 | ||
| 219 | -Bash | 223 | + > 如果您在拉取镜像时遇到速度过慢的问题,可以修改 `docker-compose.yml` 文件中对应服务下的 `image` 字段,以使用其他的镜像源。 |
| 220 | 224 | ||
| 221 | -``` | ||
| 222 | -docker pull ghcr.io/666ghj/bettafish:latest | ||
| 223 | -``` | ||
| 224 | - | ||
| 225 | -> ⚠️ **注意:** 如果拉取速度较慢,您可以尝试将镜像仓库地址 `ghcr.io` 替换为 `ghcr.nju.edu.cn` 进行加速: | ||
| 226 | -> | ||
| 227 | -> Bash | ||
| 228 | -> | ||
| 229 | -> ``` | ||
| 230 | -> docker pull ghcr.nju.edu.cn/666ghj/bettafish:latest | ||
| 231 | -> ``` | ||
| 232 | - | ||
| 233 | - | ||
| 234 | - | ||
| 235 | -### 2. 🚀 使用 Docker Compose 运行 | ||
| 236 | - | ||
| 237 | - | ||
| 238 | - | ||
| 239 | -拉取镜像后,您需要使用项目代码中提供的 `docker-compose.yml` 文件来启动服务。 | ||
| 240 | - | ||
| 241 | - | ||
| 242 | - | ||
| 243 | -#### A. 修改 `docker-compose.yml` | ||
| 244 | - | ||
| 245 | - | ||
| 246 | - | ||
| 247 | -打开项目中的 `docker-compose.yml` 文件,并修改 `bettafish` 服务下的 `image` 字段。将其值替换为您刚才拉取的**完整镜像名称**。 | ||
| 248 | - | ||
| 249 | -**示例:** | ||
| 250 | - | ||
| 251 | -将原始配置: | ||
| 252 | - | ||
| 253 | -YAML | ||
| 254 | - | ||
| 255 | -``` | ||
| 256 | -services: | ||
| 257 | - bettafish: | ||
| 258 | - build: | ||
| 259 | - context: . | ||
| 260 | - dockerfile: Dockerfile | ||
| 261 | - image: bettafish:latest # <-- 将此处的镜像名称替换为你拉取的名称 | ||
| 262 | - container_name: bettafish | ||
| 263 | -# ... 其他配置 | ||
| 264 | -``` | ||
| 265 | - | ||
| 266 | -修改为(以 `ghcr.io/666ghj/bettafish:latest` 为例): | ||
| 267 | - | ||
| 268 | -YAML | ||
| 269 | - | ||
| 270 | -``` | ||
| 271 | -services: | ||
| 272 | - bettafish: | ||
| 273 | - image: ghcr.io/666ghj/bettafish:latest # <-- 替换为你拉取的镜像名称 | ||
| 274 | - container_name: bettafish | ||
| 275 | -# ... 其他配置 | ||
| 276 | -``` | ||
| 277 | - | ||
| 278 | - | ||
| 279 | - | ||
| 280 | -#### B. 启动服务 | ||
| 281 | - | ||
| 282 | - | ||
| 283 | - | ||
| 284 | -在包含修改后的 `docker-compose.yml` 文件的目录下,执行以下命令启动服务: | ||
| 285 | - | ||
| 286 | -Bash | ||
| 287 | - | ||
| 288 | -``` | ||
| 289 | -docker compose up -d | ||
| 290 | -``` | ||
| 291 | - | ||
| 292 | - | ||
| 293 | - | ||
| 294 | -### 3. ⚙️ 系统配置(数据库与模型) | ||
| 295 | - | ||
| 296 | - | ||
| 297 | - | ||
| 298 | -服务启动后,您需要进入系统进行配置。 | ||
| 299 | - | ||
| 300 | - | ||
| 301 | - | ||
| 302 | -#### A. 数据库配置 | ||
| 303 | - | ||
| 304 | - | ||
| 305 | - | ||
| 306 | -请按照以下参数配置数据库连接: | 225 | + > 在原 `docker-compose.yml` 文件中,我们已经通过**注释**的方式提供了备用(或其他)镜像地址供您替换。 |
| 307 | 226 | ||
| 308 | -| **参数** | **值** | **说明** | | ||
| 309 | -| --------------- | ----------- | -------------------------------------------- | | ||
| 310 | -| **DB_HOST** | `db` | 数据库服务名称(在 `docker-compose` 网络中) | | ||
| 311 | -| **DB_PORT** | `5432` | 数据库端口(PostgreSQL 默认) | | ||
| 312 | -| **DB_USER** | `bettafish` | 数据库用户名 | | ||
| 313 | -| **DB_PASSWORD** | `bettafish` | 数据库密码 | | ||
| 314 | -| **DB_NAME** | `bettafish` | 数据库名称 | | 227 | +### 2. 配置说明 |
| 315 | 228 | ||
| 316 | -> **提示:** 除上述参数外,其他数据库相关配置请**保留默认值**。 | 229 | +#### 数据库配置 (Database Configuration) |
| 317 | 230 | ||
| 231 | +请按照以下参数配置数据库连接信息: | ||
| 318 | 232 | ||
| 233 | +| 配置项 | 填写值 | 说明 | | ||
| 234 | +| :--- | :--- | :--- | | ||
| 235 | +| `DB_HOST` | `db` | 数据库服务名称 (对应 `docker-compose.yml` 中的服务名) | | ||
| 236 | +| `DB_PORT` | `5432` | 默认 PostgreSQL 端口 | | ||
| 237 | +| `DB_USER` | `bettafish` | 数据库用户名 | | ||
| 238 | +| `DB_PASSWORD` | `bettafish` | 数据库密码 | | ||
| 239 | +| `DB_NAME` | `bettafish` | 数据库名称 | | ||
| 240 | +| **其他** | **保持默认** | 数据库连接池等其他参数请保持默认设置。 | | ||
| 319 | 241 | ||
| 320 | -#### B. 大模型配置 | 242 | +#### 大模型配置 |
| 321 | 243 | ||
| 322 | -完成数据库配置后,请正常配置所有您需要使用的大模型相关参数。 | 244 | +在完成数据库配置后,请正常配置**所有大模型相关的参数**,确保系统能够连接到您选择的大模型服务。 |
| 323 | 245 | ||
| 324 | -配置完成后,系统即可启动并正常运行。 | 246 | +完成上述所有配置并保存后,系统即可正常运行。 |
| 325 | 247 | ||
| 326 | ------ | 248 | ------ |
| 327 | 249 |
-
Please register or login to post a comment