style: translate deployment docs for i18n

pull/90/head
moonrailgun 2 years ago
parent d57900bd6d
commit 8066330d60

@ -1,4 +1,4 @@
{
"label": "应用部署",
"label": "Application Deployment",
"position": 10
}

@ -1,34 +1,35 @@
---
sidebar_position: 9
title: 部署管理后台(可选)
title: Deployment admin platform (optional)
---
:::info
管理后台的功能还在不断迭代中,目前正处于前期体验版
后续会不断丰富内部的内容
The feature of `admin` is still being iterated, and it is currently in the early trial version
We will continue to enrich the internal content in the future
:::
从`github`获取最新的管理后台配置:
Get the latest `admin` configuration from `github`:
```bash
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/admin.yml
```
在环境变量 `docker-compose.env` 中设置管理后台的账号和密码:
Set the account and password of the `admin` in the environment variable `docker-compose.env`:
```ini
ADMIN_USER=tailchat
ADMIN_PASS=<这里写入独立的后台密码, 不要告知其他人>
ADMIN_PASS=<Write the independent background password here, do not tell others>
```
然后使用[多文件方式](https://docs.docker.com/compose/extends/#understanding-multiple-compose-files)启动应用:
Then use [Multiple Files](https://docs.docker.com/compose/extends/#understanding-multiple-compose-files) to start the application:
```bash
docker compose -f docker-compose.yml -f admin.yml up -d
```
*注意先后顺序,因为`admin.yml`依赖`docker-compose.yml`所以要放在后面*
*Pay attention to the order, because `admin.yml` depends on `docker-compose.yml`, so it should be placed behind*
此时访问后台地址后面追加`/admin/`即可访问:
At this time, add `/admin/` after the access backend address to access:
```
https://tailchat.example.com/admin/
```
*注意不要忘记在最后有一个`/`*
*Note: don't forget to have a `/` at the end*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 169 KiB

@ -1,11 +1,11 @@
---
sidebar_position: 99
title: 开发环境
title: Development environment
---
对于开发环境的搭建tailchat 提供了非常简单快捷的方式:
For setting up the development environment, tailchat provides a very simple and fast way:
## 使用Docker快速搭建依赖环境
## Use Docker to quickly build a dependent environment
**mongodb**
```bash
@ -28,11 +28,13 @@ docker run -d \
minio/minio server /data --console-address ":9001"
```
### 启动开发服务器
### Start the development server
```bash
pnpm install
pnpm dev
```
可以编辑`.env`的配置为自己相关的上下文
You can edit the configuration of `server/.env` to your own relevant context
The file can be started from `server/.env.example`

@ -1,90 +0,0 @@
---
sidebar_position: 104
title: Docker Compose 部署服务端(Deprecated)
---
:::caution 弃用警告
该文档已弃用。建议访问最新版的部署文档以获得最新的支持, [点击此处跳转](./docker-compose.mdx)
我们保留本篇文档是为了希望安装 `1.x` 版本之前的用户准备的
:::
## 安装环境
### Docker / Docker Compose
首先需要确保有 `Docker / Docker Compose` 环境
安装方式如下:
- [Docker](https://docs.docker.com/engine/install/)
- [Docker Compose](https://docs.docker.com/compose/install/)
### node 环境
- 从[官网下载](https://nodejs.org/en/download/)
- 或者使用[nvm](https://github.com/nvm-sh/nvm)
#### 安装pnpm
`pnpm` 是一个`nodejs`的包管理工具, 是`npm`的替代品, 为了确保能有与开发者一样依赖环境强烈建议你使用pnpm作为后续的包管理工具
```bash
npm install -g pnpm
```
## Clone 项目
将项目从远程下载到本地:
```bash
mkdir msgbyte && cd msgbyte
git clone https://github.com/msgbyte/tailchat.git # clone 客户端
git clone https://github.com/msgbyte/tailchat-server.git # clone 服务端
```
## 编译项目
#### 前端项目
```bash
cd tailchat/web
pnpm install # 安装依赖
export SERVICE_URL=http://127.0.0.1:11000 # 配置服务端地址这里的127.0.0.1 可以替换为任何网页可以访问到的服务端地址
pnpm build # 构建项目
```
构建完毕后会生成一个`tailchat/web/dist`目录,将该目录托管到任意网页托管服务器即可(如使用`http-server`进行静态代理或者直接上传到`oss`)
> NOTICE: 因为webpack编译需要比较大的内存资源占用在服务器资源不足的场合建议使用本地编译完毕以后上传到服务端
#### 使用docker-compose构建服务端
> 在启动前需要检查代码环境变量
修改 `docker-compose.env` 文件的配置,以下内容推荐修改:
- `API_URL` 对外可访问的url地址用于文件服务访问
- `SECRET` 服务端加密秘钥用于生成Token. 默认为 `tailchat`
```bash
cd tailchat-server
docker-compose build
docker-compose up -d
```
*在`docker-compose.env`文件中提供了部分环境变量可供配置。*
`tailchat` 的`docker-compose.yml`配置默认提供了如下配置:
- `mongodb`: 持久化数据库
- `redis`: KV数据库与消息中转服务
- `minio`: 分布式文件服务
其中持久化文件(数据库, 文件存储)通过 `docker volume` 统一管理:
```
docker volume ls | grep "tailchat-server"
```

@ -1,120 +1,120 @@
---
sidebar_position: 4
title: Docker Compose 部署
title: Docker Compose deployment
---
## 建议配置
## Recommended configuration
建议最低配置 **1核2G**
Recommended minimum configuration **1 core 2G**
> 如果只有 **1核1G**? 请参阅我的博客: [Linux 小资源服务器使用经验总结](http://moonrailgun.com/posts/6769ba51/) 通过交换内存来拓展内存空间
> If there is only **1 core 1G**? Please refer to my blog: [Linux small resource server experience summary](http://moonrailgun.com/posts/6769ba51/) expand memory space by swapping memory
>
> 可供参考的内存用量:
> Memory usage for reference:
> ![](/img/misc/memory-usage.png)
## 前置环境
## Pre-environment
### Docker / Docker Compose
首先需要确保有 `Docker / Docker Compose` 环境
First you need to make sure you have a `Docker / Docker Compose` environment
安装方式可参考: [安装 Docker 环境](./install-docker.md)
The installation method can refer to: [Install the docker environment](./install-docker.md)
## 拉取镜像
## Pull Image
你可以通过从**公共镜像拉取已经编译好的镜像**或者**通过源码手动编译**
You can pull the compiled image from **public image** or **manually compile from source code**
> 使用已经编译好的镜像可以无需花费足够的计算机资源进行编译,对小资源配置的服务器会十分友好。另外相对于源码编译,公共镜像的代码更加稳定。
> Using the compiled image can compile without spending enough computer resources, which is very friendly to servers with small resource configurations. In addition, compared to source code compilation, the code of the public image is more stable.
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<Tabs groupId="build">
<TabItem value="cli" label="使用cli一键安装" default>
<TabItem value="cli" label="One-command installation using cli" default>
> 使用 `cli` 请确保在你的服务器上已经拥有了node环境(建议node版本 16+)
> 如果对node不了解可以使用`从公共镜像中手动安装`方式
> Use `cli` Please make sure you already have a node environment on your server (node version 16+ is recommended)
> If you don't know about node, you can use `Manually install from public image`
使用 命令行工具 tailchat-cli 一键拉取/更新镜像:
Use the command line tool `tailchat-cli` to pull/update the image with one click:
```bash
npx tailchat-cli docker update
```
</TabItem>
<TabItem value="public-image" label="从公共镜像中手动安装" default>
<TabItem value="public-image" label="Manually install from public image" default>
使用Docker原生命令手动安装:
Manually install using Docker native commands:
```bash
docker pull moonrailgun/tailchat # 从公共镜像库拉取 tailchat镜像
docker tag moonrailgun/tailchat tailchat # 将下载的镜像改名为tailchat(和源码编译保持一致,如果不改的话会走源码编译流程)
docker pull moonrailgun/tailchat # Pull the tailchat image from the public image registry
docker tag moonrailgun/tailchat tailchat # Retag the downloaded image to tailchat (consistent with source code compilation, if not changed, it will follow the source code compilation process)
```
:::info
可以从 [Docker Hub](https://hub.docker.com/r/moonrailgun/tailchat/tags) 查看历史支持的镜像版本
You can view historically supported image versions from [Docker Hub](https://hub.docker.com/r/moonrailgun/tailchat/tags)
:::
</TabItem>
<TabItem value="source-code" label="从源码中编译">
<TabItem value="source-code" label="Compile from source">
*本节内容适用于高级玩家用于获取最新的tailchat实现请确保你有足够的 docker, nodejs, git 的使用常识*
*This section is for advanced players to get the latest tailchat implementation, please make sure you have enough knowledge of `docker`, `nodejs`, `git`*
#### 编译环境 node 环境
#### Compilation environment
- 从 [官网下载](https://nodejs.org/en/download/)
- 或者使用 [nvm](https://github.com/nvm-sh/nvm)
- Download from [official website](https://nodejs.org/en/download/)
- Or use [nvm](https://github.com/nvm-sh/nvm)
#### 安装pnpm
#### Install pnpm
`pnpm` 是一个`nodejs`的包管理工具, 是`npm`的替代品, 为了确保能有与开发者一样依赖环境强烈建议你使用pnpm作为后续的包管理工具
`pnpm` is a package management tool for `nodejs`, a substitute for `npm`, in order to ensure the same dependency environment as developers, it is strongly recommended that you use pnpm as a follow-up package management tool
```bash
npm install -g pnpm
```
#### Clone 项目
#### Clone Repo
将项目从远程下载到本地:
Download the project from remote:
```bash
mkdir msgbyte && cd msgbyte
git clone https://github.com/msgbyte/tailchat.git # 克隆项目到本地
git clone https://github.com/msgbyte/tailchat.git # Clone the project to local
```
#### 编译项目
#### Compile project
```bash
cd tailchat && docker compose build
```
*编译对服务器配置有一定要求2核4G编译约10分钟供参考*
*Compilation has certain requirements on server configuration, 2-core 4G compilation takes about 10 minutes, for reference*
编译完毕后可以通过 `docker images` 查看编译完毕的镜像。
After the compilation is complete, you can view the compiled image through `docker images`.
</TabItem>
</Tabs>
## 启动项目
## Startup project
<Tabs groupId="build">
<TabItem value="cli" label="使用cli一键安装" default>
<TabItem value="cli" label="One-command installation using cli" default>
```bash
npx tailchat-cli docker init
```
执行该命令会以交互式的方式向你询问一些配置相关的问题(如下图),填写完毕后即可自动生成配置文件
Executing this command will ask you some configuration-related questions in an interactive manner (as shown in the figure below), and the configuration file will be automatically generated after filling it out
![](./assets/docker-init.png)
</TabItem>
<TabItem value="public-image" label="从公共镜像中手动安装">
<TabItem value="public-image" label="Manually install from public image">
> 启动之前需要下载配置文件以告知 `docker-compose` 要如何启动镜像
> 从仓库下载配置文件与配置环境变量:
> A configuration file needs to be downloaded before starting to tell `docker-compose` how to start the image
> Download configuration files and configure environment variables from the repository:
> - [docker-compose.yml](https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.yml)
> - [docker-compose.env](https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.env)
@ -124,23 +124,22 @@ wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.ym
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.env
```
在启动之前需要修改一下配置
Need to modify the configuration before starting
修改 `docker-compose.env` 文件的配置,以下字段推荐修改:
- `API_URL` 对外可访问的url地址用于文件服务访问, 可以是域名也可以是ip **如果出现发送图片不能正常显示就是这个变量没有设置**
- `SECRET` 服务端加密秘钥用于生成Token. 默认为 `tailchat`
Modify the configuration of the `docker-compose.env` file, the following fields are recommended to be modified:
- `API_URL` is an externally accessible url address, used for file service access, it can be a domain name or an ip **If the sent picture cannot be displayed normally, this variable is not set**
- `SECRET` server-side encryption key, used to generate Token. The default is `tailchat`
</TabItem>
<TabItem value="source-code" label="从源码中编译">
<TabItem value="source-code" label="Compile from source">
在启动之前需要修改一下配置
Need to modify the configuration before starting
修改 `docker-compose.env` 文件的配置,以下字段推荐修改:
Modify the configuration of the `docker-compose.env` file, the following fields are recommended to be modified:
- `API_URL` 对外可访问的url地址用于文件服务访问, 可以是域名也可以是ip
- `SECRET` 服务端加密秘钥用于生成Token. 默认为 `tailchat`
- `API_URL` is an externally accessible url address, used for file service access, it can be a domain name or an ip **If the sent picture cannot be displayed normally, this variable is not set**
- `SECRET` server-side encryption key, used to generate Token. The default is `tailchat`
</TabItem>
@ -148,37 +147,37 @@ wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.en
完成配置后使用`docker-compose` 一键启动 `Tailchat` 应用:
After completing the configuration, use `docker-compose` to start the `Tailchat` application with one click:
```bash
# 确保配置文件(docker-compose.yml和docker-compose.env)在当前目录下
# 执行以下命令一键启动
# Make sure the configuration files (docker-compose.yml and docker-compose.env) are in the current directory
# Execute the following command to start with one key
docker compose up -d
```
访问: `http://<server ip>:11000` 即可打开tailchat
Visit: `http://<server ip>:11000` to open tailchat.
注意部分云服务可能需要手动开放防火墙端口。
Note that some cloud services may need to manually open firewall ports.
*在`docker-compose.env`文件中提供了部分环境变量可供配置。*
*Some environment variables are provided in the `docker-compose.env` file for configuration.*
`tailchat` 的`docker-compose.yml`配置默认提供了如下配置:
The `docker-compose.yml` configuration of `tailchat` provides the following configuration by default:
- `mongodb`: 持久化数据库
- `redis`: KV数据库与消息中转服务
- `minio`: 分布式文件服务
- `mongodb`: Persistent Database
- `redis`: KV database and message transport service
- `minio`: Distributed file service
其中持久化文件(数据库, 文件存储)通过 `docker volume` 统一管理:
The persistent files (database, file storage) are managed uniformly through `docker volume`:
```
docker volume ls | grep "tailchat-server"
```
:::info
完整的环境变量可以查询 [环境变量](./environment.md)
Complete environment variables can be queried [Environment Variables](./environment.md)
:::
## 更多部署相关文档
## More deployment related documents
- [搭建 https 网关(可选)](./https-gateway.md)
- [部署管理后台(可选)](./admin.md)
- [Build https gateway (optional)](./https-gateway.md)
- [Deployment admin platform (optional)](./admin.md)

@ -1,35 +1,35 @@
---
sidebar_position: 7
title: 环境变量
title: Environment Variable
---
## 环境变量
## Environment Variable
| 变量名 | 默认值 | 描述 |
| Name | Default Value | Description |
| ----- | ------ | --- |
| PORT | 11000 | 网关服务端口号 |
| SECRET | tailchat | 加密秘钥, 用于JWT |
| API_URL | http://127.0.0.1:11000 | 对外可访问的url地址用于文件服务访问 |
| MONGO_URL | - | 数据库服务地址 |
| REDIS_URL | - | Redis服务地址 |
| MINIO_URL | - | 文件服务地址(minio) |
| MINIO_USER | - | 文件服务用户名 |
| MINIO_PASS | - | 文件服务密码 |
| MINIO_BUCKET_NAME | tailchat | 文件服务存储桶名 |
| SMTP_SENDER | - | 邮件服务发件人(示例: `"Tailchat" example@163.com`) |
| SMTP_URI | - | 邮件服务连接地址(示例: `smtp://username:password@smtp.example.com/?pool=true`) |
| FILE_LIMIT | 1048576 | 文件/图片上传的大小限制默认为1m请输入数字 |
| EMAIL_VERIFY | - | 是否开启邮箱校验, 如果为 "1" 或者 "true" 则在注册时增加邮箱校验控制 |
| DISABLE_LOGGER | - | 是否禁用日志输出, 如果为 "1" 或者 "true" 则在运行中关闭日志 |
| PORT | 11000 | Gateway service port number |
| SECRET | tailchat | encryption key, used for JWT |
| API_URL | http://127.0.0.1:11000 | Externally accessible url address, used for file service access |
| MONGO_URL | - | Database service address |
| REDIS_URL | - | Redis service address |
| MINIO_URL | - | File service address (minio) |
| MINIO_USER | - | File service username |
| MINIO_PASS | - | File service password |
| MINIO_BUCKET_NAME | tailchat | file service bucket name |
| SMTP_SENDER | - | Mail service sender (example: `"Tailchat" example@163.com`) |
| SMTP_URI | - | mail service connection address (example: `smtp://username:password@smtp.example.com/?pool=true`) |
| FILE_LIMIT | 1048576 | File/image upload size limit, the default is 1m, please enter a number |
| EMAIL_VERIFY | - | Whether to enable email verification, if it is "1" or "true", add email verification control when registering |
| DISABLE_LOGGER | - | Whether to disable the log output, if "1" or "true" turn off the log on the fly |
> 部分环境变量示例可见: https://github.com/msgbyte/tailchat/blob/master/server/.env.example
> Some examples of environment variables can be seen: https://github.com/msgbyte/tailchat/blob/master/server/.env.example
### 使用文件进行配置环境变量
### Use files to configure environment variables
- 如果是本地方式启动,请复制 `.env.example``.env` 然后进行编辑
- - If starting locally, copy `.env.example` to `.env` and edit
```bash
mv .env.example .env
vi .env
```
- 如果是 `docker-compose` 启动,可以直接编辑 `docker-compose.env`, 改动后直接使用 `docker compose up -d` 即可生效
- If it is started by `docker-compose`, you can directly edit `docker-compose.env`, and use `docker compose up -d` directly after the modification to take effect

@ -1,21 +1,21 @@
---
sidebar_position: 8
title: 搭建 https 网关(可选)
title: Build https gateway (optional)
---
`Tailchat` 中,有一些服务是强依赖 `https` 的,比如音视频通话、嵌入外部的 `https` 媒体资源与网页等。
In `Tailchat`, some services are strongly dependent on `https`, such as audio and video calls, embedding external `https` media resources and web pages, etc.
同时为了用户的安全性,我们非常建议将 `Tailchat` 对外以 `https` 服务的形式提供。
At the same time, for the safety of users(client to server), we highly recommend that `Tailchat` be provided externally as `https` service.
![](/img/architecture/https-gateway.excalidraw.svg)
如果你没有相关的经验,且在同一台机器上只部署了 `Tailchat` 服务(没有占用 **80**/**443** 端口),那么我们推荐从 `Tailchat` 自带的 `swag` 配置开始。
If you have no related experience, and only deploy `Tailchat` service on the same machine (without occupying **80**/**443** port), then we recommend `swag` from `Tailchat` Configuration begins.
:::info
你可以在 [Github](https://github.com/msgbyte/tailchat/tree/master/docker) 看到原始的配置内容
You can see the original configuration in [Github](https://github.com/msgbyte/tailchat/tree/master/docker)
:::
通过以下命令直接拉取所需要的配置文件
Pull the required configuration file directly by the following command
```bash
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/swag.yml
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/swag.env.example -O swag.env
@ -23,23 +23,23 @@ mkdir config
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/config/nginx.conf -O ./config/nginx.conf
```
完成后应该会在在当前目录看到以下三个文件:
After completion, you should see the following three files in the current directory:
- `swag.yml`
- `swag.env`
- `config/nginx.conf`
修改`swag.env`的内容,将 `URL` 的值改为域名, 如: `URL=tailchat.example.com`
Modify the content of `swag.env`, change the value of `URL` to the domain name, such as: `URL=tailchat.example.com`
:::info
`https`协议是依赖域名做证书校验的,因此需要提前分配一个域名指向目标服务器
The `https` protocol relies on the domain name for certificate verification, so it is necessary to assign a domain name in advance to point to the target server
:::
域名的地址需要在购买域名的管理后台创建一条A指向记录。
The address of the domain name needs to create an A pointing record in the management background of the purchased domain name.
在分配好域名后我们就可以启动服务了。
After assigning the domain name we can start the service.
```bash
docker compose -f ./swag.yml up -d
```
如果一切顺利的话,此时`swag`服务已经自动为你申请了一个证书并启动了反向代理服务,此时在浏览器访问 `https://tailchat.example.com` 的话可以看到熟悉的界面已经出现了。
If everything goes well, the `swag` service has automatically applied for a certificate for you and started the reverse proxy service. At this time, if you visit `https://tailchat.example.com` in the browser, you can see the familiar The interface is already there.

@ -1,33 +1,33 @@
---
sidebar_position: 2
title: 安装docker环境
title: Install the docker environment
---
> 因为 `Tailchat` 的环境对于初学者来说有一些些复杂,因此提供了 `docker` 为主的一键环境搭建配置。但是对于`docker`不熟的同学来说可能`docker`本身也是一种复杂度。
> Because the `Tailchat` environment is a bit complicated for beginners, it provides a `docker-based one-command` environment configuration. But for students who are not familiar with `docker`, `docker` itself may also be a kind of complexity.
> 因此为了方便大家可以快速搭建 `Tailchat`,提供了本文作为引导。对于 `docker` 有一定了解的同学可以跳过本篇
> Therefore, in order to facilitate everyone to quickly build `Tailchat`, this article is provided as a guide. Students who have a certain understanding of `docker` can skip this article
> 本文以 `linux centos` 为例,目标是方便大家直接在服务器上部署。对于想要在其他系统(`windows`, `mac`) 使用的同学可以参考官方文档进行`docker`的安装
> This article takes `linux centos` as an example, the goal is to facilitate the deployment directly on the server. For students who want to use it on other systems (`windows`, `mac`), you can refer to the official documentation to install `docker`
## 一键安装 docker
## One-command installation of docker
官方维护的一键安装 `Docker` 脚本, 适合不喜欢研究细节的同学
Officially maintained one-command installation `Docker` script, suitable for students who dont like to study details
在服务器终端按照以下操作依次执行即可
Execute the following operations in sequence on the server terminal
```bash
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
```
如果安装成功的话就可以跳过后续内容了。
If the installation is successful, you can skip the subsequent content.
## 手动安装docker与docker compose
## Manually install docker and docker compose
官方文档: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
Official document: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
```bash
# 如果之前有安装过docker可以执行以下命令删除旧的
# If you have installed docker before, you can execute the following command to delete the old one
sudo yum remove docker \
docker-client \
docker-client-latest \
@ -40,40 +40,41 @@ sudo yum remove docker \
```bash
sudo yum install -y yum-utils # yum-utils 提供了 yum-config-manager 命令
sudo yum install -y yum-utils # yum-utils provides the yum-config-manager command
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
```
<!-- 安装docker 与 docker-compose 插件 -->
> Install docker and docker-compose plugins
```bash
sudo yum install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
```
*PS: `docker-compose-plugin`提供了`docker compose`命令,用法同`docker-compose`*
*PS: `docker-compose-plugin` provides the `docker compose` command, the usage is the same as `docker-compose`*
> 如果`docker ps`显示守护进程没有启动(Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?)的话可以执行以下命令启动: `sudo systemctl start docker`
> If `docker ps` shows that the daemon process is not started (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?), you can execute the following command to start it: `sudo systemctl start docker`
## 单独安装 docker-compose
## Install docker-compose separately
如果购买的服务器已经预装了docker, 想要单独安装docker-compose的话可以看本节内容:
If the purchased server has been pre-installed with docker, if you want to install docker-compose separately, you can read this section:
官方文档: [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/)
Official document: [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/)
```bash
curl -SL https://github.com/docker/compose/releases/download/v2.4.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose # 下载二进制文件
sudo chmod +x /usr/local/bin/docker-compose # 给予执行权限
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose # 软链接到path, 可以直接调用
docker-compose --version # 该行命令返回版本号则成功安装
curl -SL https://github.com/docker/compose/releases/download/v2.4.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose # Download binaries
sudo chmod +x /usr/local/bin/docker-compose # give execute permission
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose # Soft link to path, can be called directly
docker-compose --version # The line command returns the version number and the installation is successful
```
## NOTICE
因为历史原因,`docker compose` 拥有`docker`插件版本与 `docker compose` 独立版本。一般意义上可以认为 `docker compose xxx``docker-compose xxx` 是等价的
For historical reasons, `docker compose` has a `docker` plugin version and a `docker compose` standalone version. Generally speaking, `docker compose xxx` is equivalent to `docker-compose xxx`
## 参考文档
## Reference
- [Docker](https://docs.docker.com/engine/install/)
- [Docker Compose](https://docs.docker.com/compose/install/)

@ -1,20 +1,20 @@
---
sidebar_position: 1
title: 快速开始
title: Quick Start
---
## 演示环境
## Demo environment
演示环境会持续部署最新前端代码和不定期更新后端代码
The demo environment will continuously deploy the latest front-end code and update the back-end code from time to time
[https://nightly.paw.msgbyte.com/](https://nightly.paw.msgbyte.com/)
## 部署方式
## Deployment method
强烈推荐使用 `docker-compose` 部署 `tailchat`
It is highly recommended to use `docker-compose` to deploy `tailchat`
教程请翻阅: [Docker Compose 部署](./docker-compose.mdx)
Please refer to the tutorial: [Docker Compose Deployment](./docker-compose.mdx)
## 系统架构
## system structure
见 [系统架构](../architecture.md)
See [System Architecture](../architecture.md)

@ -1,13 +1,13 @@
---
sidebar_position: 10
title: 常见问题
title: Troubleshooting
---
## 服务端相关
## Server related
### Websocket 连接访问不正确,表现形式是可以注册但是无法打开主界面
### The Websocket connection access is incorrect, the manifestation is that it can be registered but the main interface cannot be opened
如果使用了 nginx 进行反向代理。请确保nginx的配置支持websocket一个参考的配置如下:
If nginx is used for reverse proxy. Please ensure that the configuration of nginx supports websocket, a reference configuration is as follows:
```
server {
@ -31,20 +31,20 @@ server {
}
```
### 内网可以访问外网无法访问?
### Internal Network can be accessed but External Network can not be accessed?
可以启动一个简单的http服务看下是不是docker-proxy层的问题。*该问题可能会出现在腾讯轻量云的docker-ce镜像机器上, 可以选择使用centos7镜像重装*
You can start a simple http service to see if it is a problem with the docker-proxy layer. *This problem may occur on the docker-ce image machine of Tencent lighthouse, you can choose to use the centos7 image to reinstall*
```bash
docker run --rm --name nginx-test -p 8080:80 nginx
```
## 开放平台相关
## Openapi platform related
如果开放平台部署在代理之后,如果出现访问 `/open/.well-known/openid-configuration` 结果的json中endpoint不正确的情况请尝试修改代理的配置。
If the open platform is deployed behind a proxy, if the endpoint in the JSON of the access `/open/.well-known/openid-configuration` result is incorrect, please try to modify the configuration of the proxy to forward real ip.
nginx:
Such as nginx:
```
location / {

@ -3,10 +3,6 @@
"message": "Next",
"description": "The label for version current"
},
"sidebar.tutorialSidebar.category.应用部署": {
"message": "应用部署",
"description": "The label for category 应用部署 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Operations": {
"message": "运维操作",
"description": "The label for category Operations in sidebar tutorialSidebar"
@ -42,5 +38,9 @@
"sidebar.tutorialSidebar.category.Development Documentation": {
"message": "开发文档",
"description": "The label for category Development Documentation in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Application Deployment": {
"message": "应用部署",
"description": "The label for category Application Deployment in sidebar tutorialSidebar"
}
}

@ -35,4 +35,6 @@ pnpm install
pnpm dev
```
可以编辑`.env`的配置为自己相关的上下文
可以编辑`server/.env`的配置为自己相关的上下文
该文件可以从 `server/.env.example` 开始

Loading…
Cancel
Save