优化
This commit is contained in:
@@ -91,14 +91,44 @@ game-docker/
|
||||
|
||||
### 前置要求
|
||||
|
||||
- Docker Engine 20.10+
|
||||
- Docker Compose v2+
|
||||
- Linux 服务器(推荐 Ubuntu 22.04 / CentOS 8+,最低 2C 2G)
|
||||
- 域名已解析到服务器 IP(3 个域名:API / DLWEB / wxserver)
|
||||
- 服务器 80 和 443 端口可用
|
||||
- Docker 和 Docker Compose(如未安装,`deploy.sh` 会自动安装并配置国内镜像加速)
|
||||
|
||||
### 1. 准备环境变量
|
||||
### 1. 上传项目到服务器
|
||||
|
||||
将 `game-docker` 目录上传到服务器 `/opt/youle/` 下:
|
||||
|
||||
```bash
|
||||
# 方式一:从本地直接上传(Windows 使用 scp / WinSCP / SFTP)
|
||||
scp -r game-docker/ root@your-server-ip:/opt/youle/
|
||||
|
||||
# 方式二:从 Git 仓库拉取
|
||||
ssh root@your-server-ip
|
||||
mkdir -p /opt/youle
|
||||
cd /opt/youle
|
||||
git clone <仓库地址> game-docker
|
||||
```
|
||||
|
||||
上传后服务器上的目录结构:
|
||||
|
||||
```
|
||||
/opt/youle/game-docker/
|
||||
├── .env.example
|
||||
├── docker-compose.yml
|
||||
├── deploy.sh
|
||||
├── init-ssl.sh
|
||||
├── api/
|
||||
├── dlweb/
|
||||
├── wxserver_daoqi/
|
||||
└── docker/
|
||||
```
|
||||
|
||||
### 2. 准备环境变量
|
||||
|
||||
```bash
|
||||
cd /opt/youle/game-docker
|
||||
cp .env.example .env
|
||||
vim .env
|
||||
```
|
||||
@@ -128,7 +158,7 @@ WX_PAY_KEY=your-key
|
||||
SSL_EMAIL=your-email@example.com
|
||||
```
|
||||
|
||||
### 2. 首次申请 SSL 证书
|
||||
### 3. 首次申请 SSL 证书
|
||||
|
||||
```bash
|
||||
chmod +x deploy.sh init-ssl.sh
|
||||
@@ -140,7 +170,7 @@ chmod +x deploy.sh init-ssl.sh
|
||||
./deploy.sh ssl-init
|
||||
```
|
||||
|
||||
### 3. 启动所有服务
|
||||
### 4. 启动所有服务
|
||||
|
||||
```bash
|
||||
./deploy.sh up
|
||||
@@ -159,7 +189,7 @@ chmod +x deploy.sh init-ssl.sh
|
||||
./deploy.sh logs cronjob
|
||||
```
|
||||
|
||||
### 4. 部署命令速查
|
||||
### 5. 部署命令速查
|
||||
|
||||
| 命令 | 说明 |
|
||||
|------|------|
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user