mirror of
https://github.com/619dev/PaperPhone.git
synced 2026-05-07 06:15:44 +08:00
更新说明文档
This commit is contained in:
26
README.md
26
README.md
@@ -51,10 +51,27 @@
|
||||
|
||||
## 快速启动
|
||||
|
||||
### 方式零:Zeabur 一键云部署
|
||||
|
||||
[](https://zeabur.com/templates/P2J7Y3?referralCode=619dev)
|
||||
|
||||
> [!NOTE]
|
||||
> 部署完成后需手动完成一步配置,否则注册/登录无法使用:
|
||||
> 1. 进入 Zeabur 控制台 → **server 服务** → Environment Variables → 复制 `ZEABUR_WEB_URL` 的值(如 `http://10.43.x.x:3000`)
|
||||
> 2. 进入 **client 服务** → Environment Variables → 添加变量 `SERVER_URL` = 上一步复制的值
|
||||
> 3. Restart client 服务
|
||||
|
||||
**已知注意事项:**
|
||||
- 首次启动 server 会自动创建数据库表(`CREATE TABLE IF NOT EXISTS`),无需手动导入 schema
|
||||
- Redis 在集群内无需密码,已默认关闭认证
|
||||
- 若需配置 MySQL root 密码,可在 server 服务的 `DB_PASS` 里手动填写 MySQL 服务的 `MYSQL_ROOT_PASSWORD`
|
||||
|
||||
---
|
||||
|
||||
### 方式一:Docker Compose(推荐,无需本地构建)
|
||||
|
||||
```bash
|
||||
# 克隆仓库(仅需配置文件,镜像直接从 Docker Hub 拉取)
|
||||
# 克隆仓库
|
||||
git clone <repo-url> && cd paperphone
|
||||
|
||||
# 复制并编辑环境变量
|
||||
@@ -74,18 +91,19 @@ open http://localhost
|
||||
> 镜像已发布至 Docker Hub:
|
||||
> - `facilisvelox/paperphone-client:latest`
|
||||
> - `facilisvelox/paperphone-server:latest`
|
||||
>
|
||||
> **注意**:server 首次启动会自动初始化数据库 schema,无需手动导入 SQL 文件。
|
||||
|
||||
### 方式二:本地手动启动
|
||||
|
||||
#### 1. 准备环境
|
||||
|
||||
```bash
|
||||
# MySQL 创建数据库
|
||||
mysql -u root -p < server/db/schema.sql
|
||||
|
||||
# 复制并编辑环境变量
|
||||
cp server/.env.example server/.env
|
||||
# 填写 DB_HOST / DB_PASS / REDIS_HOST / MINIO_* 等
|
||||
|
||||
# 注:server 首次启动会自动执行 schema.sql,无需手动导入
|
||||
```
|
||||
|
||||
#### 2. 启动后端
|
||||
|
||||
26
README_EN.md
26
README_EN.md
@@ -51,10 +51,27 @@ Cryptographic Layer
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Option 0: Zeabur One-Click Cloud Deploy
|
||||
|
||||
[](https://zeabur.com/templates/P2J7Y3?referralCode=619dev)
|
||||
|
||||
> [!NOTE]
|
||||
> One manual step is required after the template deploys, otherwise login/register won't work:
|
||||
> 1. Go to Zeabur Console → **server service** → Environment Variables → copy the value of `ZEABUR_WEB_URL` (e.g. `http://10.43.x.x:3000`)
|
||||
> 2. Go to **client service** → Environment Variables → add variable `SERVER_URL` = the value copied above
|
||||
> 3. Restart the client service
|
||||
|
||||
**Known notes:**
|
||||
- On first startup, the server automatically creates all database tables (`CREATE TABLE IF NOT EXISTS`) — no manual SQL import needed
|
||||
- Redis runs without a password inside the cluster (intra-cluster network isolation is sufficient)
|
||||
- If MySQL access is denied, manually set `DB_PASS` on the server service to the value of `MYSQL_ROOT_PASSWORD` from the MySQL service
|
||||
|
||||
---
|
||||
|
||||
### Option 1: Docker Compose (Recommended — no local build needed)
|
||||
|
||||
```bash
|
||||
# Clone the repository (config files only; images are pulled from Docker Hub)
|
||||
# Clone the repository
|
||||
git clone <repo-url> && cd paperphone
|
||||
|
||||
# Copy and edit environment variables
|
||||
@@ -74,18 +91,19 @@ open http://localhost
|
||||
> Pre-built images on Docker Hub:
|
||||
> - `facilisvelox/paperphone-client:latest`
|
||||
> - `facilisvelox/paperphone-server:latest`
|
||||
>
|
||||
> **Note**: The server automatically initialises the database schema on first startup — no manual SQL import required.
|
||||
|
||||
### Option 2: Manual Local Start
|
||||
|
||||
#### 1. Prepare the environment
|
||||
|
||||
```bash
|
||||
# Create MySQL database
|
||||
mysql -u root -p < server/db/schema.sql
|
||||
|
||||
# Copy and edit environment variables
|
||||
cp server/.env.example server/.env
|
||||
# Fill in DB_HOST / DB_PASS / REDIS_HOST / MINIO_* etc.
|
||||
|
||||
# Note: the server auto-runs schema.sql on first startup
|
||||
```
|
||||
|
||||
#### 2. Start the backend
|
||||
|
||||
Reference in New Issue
Block a user