mirror of
https://github.com/tl-open-source/tl-rtc-file.git
synced 2025-09-26 19:41:16 +08:00
doc
This commit is contained in:
24
README.md
24
README.md
@@ -1,4 +1,4 @@
|
||||
# tl-rtc-file-tool 【始于文件传输,不止于文件传输】
|
||||
# tl-rtc-file-tool【始于文件传输,不止于文件传输】
|
||||
|
||||
[](https://webrtc.org.cn/)
|
||||
[](https://github.com/iamtsm/tl-rtc-file/)
|
||||
@@ -14,6 +14,27 @@
|
||||
|
||||
<p align="center">QQ群: <a href="https://jq.qq.com/?_wv=1027&k=TKCwMBjN" target="_blank">624214498 </a></p>
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [背景](#背景)
|
||||
- [简介](#简介)
|
||||
- [优点](#优点)
|
||||
- [扩展](#扩展)
|
||||
- [准备 (必须步骤)](#准备-必须步骤)
|
||||
- [配置websocket (必须步骤)](#配置websocket-必须步骤)
|
||||
- [启动 (必须步骤)](#启动-必须步骤)
|
||||
- [配置数据库 (非必须步骤)](#配置数据库-非必须步骤)
|
||||
- [管理后台 (非必须步骤)](#管理后台-非必须步骤)
|
||||
- [企微通知 (非必须步骤)](#企微通知-非必须步骤)
|
||||
- [OSS云存储 (非必须步骤)](#oss云存储-非必须步骤)
|
||||
- [Chat-GPT (非必须步骤)](#chat-gpt-非必须步骤)
|
||||
- [配置turnserver (局域网非必须步骤,公网必须步骤)](#配置turnserver-局域网非必须步骤公网必须步骤)
|
||||
- [Docker](#docker)
|
||||
- [其他形式部署](#其他形式部署)
|
||||
- [概述图](#概述图)
|
||||
- [License](#license)
|
||||
- [免责声明](#免责声明)
|
||||
|
||||
#### 背景 : 20年毕设的题目相关整理出来的
|
||||
|
||||
#### 简介 :(tl webrtc datachannel filetools)用webrt在web端传输文件,支持传输超大文件。
|
||||
@@ -22,6 +43,7 @@
|
||||
|
||||
#### 扩展 : 扩展了许多丰富的小功能,如本地屏幕录制,远程屏幕共享(无延迟),远程音视频通话(无延迟),直播(无延迟),密码房间,oss云存储,中继服务设置,webrtc检测,webrtc统计,文字传输(群聊,私聊),公共聊天,远程画板,AI聊天框,丰富的后台管理,实时执行日志展示,机器人告警通知等功能... 等等
|
||||
|
||||
|
||||
## 准备 (必须步骤)
|
||||
|
||||
1.安装node-14.21.x或14.21.x以上,npm后,进入项目目录运行下面命令
|
||||
|
432
doc/README_EN.md
432
doc/README_EN.md
@@ -1,4 +1,4 @@
|
||||
# tl-rtc-file-tool [From File Transfer to Beyond]
|
||||
# tl-rtc-file-tool - Beyond File Transmission, Originating from It
|
||||
|
||||
[](https://webrtc.org.cn/)
|
||||
[](https://github.com/iamtsm/tl-rtc-file/)
|
||||
@@ -7,277 +7,315 @@
|
||||
[](https://github.com/iamtsm/tl-rtc-file/)
|
||||
|
||||
<p align="center">
|
||||
<a href="https://im.iamtsm.cn/file" target="_blank">Demo</a> |
|
||||
<a href="https://im.iamtsm.cn/file" target="_blank">Experience Here</a> |
|
||||
<a href="https://hub.docker.com/repositories/iamtsm" target="_blank">DockerHub</a> |
|
||||
<a href="https://github.com/tl-open-source/tl-rtc-file/blob/master/README.md" target="_blank">中文-DOC</a>
|
||||
<a href="https://github.com/tl-open-source/tl-rtc-file/blob/master/doc/README_EN.md" target="_blank">EN-DOC</a>
|
||||
</p>
|
||||
|
||||
<p align="center">QQ-Group: <a href="https://jq.qq.com/?_wv=1027&k=TKCwMBjN" target="_blank">624214498 </a></p>
|
||||
<p align="center">QQ Group: <a href="https://jq.qq.com/?_wv=1027&k=TKCwMBjN" target="_blank">624214498 </a></p>
|
||||
|
||||
#### Background: Collated from the topic of my graduation project in 2020.
|
||||
## Table of Contents
|
||||
|
||||
#### Introduction: (tl webrtc datachannel filetools) transfers files using WebRTC on the web, supporting transmission of large files.
|
||||
- [Background](#background)
|
||||
- [Introduction](#introduction)
|
||||
- [Advantages](#advantages)
|
||||
- [Extensions](#extensions)
|
||||
- [Preparation (Required Steps)](#preparation-required-steps)
|
||||
- [Configure Websocket (Required Steps)](#configure-websocket-required-steps)
|
||||
- [Startup (Required Steps)](#startup-required-steps)
|
||||
- [Configure Database (Optional Steps)](#configure-database-optional-steps)
|
||||
- [Admin Panel (Optional Steps)](#admin-panel-optional-steps)
|
||||
- [Enterprise WeChat Notification (Optional Steps)](#enterprise-wechat-notification-optional-steps)
|
||||
- [OSS Cloud Storage (Optional Steps)](#oss-cloud-storage-optional-steps)
|
||||
- [Chat-GPT (Optional Steps)](#chat-gpt-optional-steps)
|
||||
- [Configure Turnserver (Local Network - Optional Steps, Public Network - Required Steps)](#configure-turnserver-local-network-optional-steps-public-network-required-steps)
|
||||
- [Docker](#docker)
|
||||
- [Other Deployment Methods](#other-deployment-methods)
|
||||
- [Overview Diagram](#overview-diagram)
|
||||
- [License](#license)
|
||||
- [Disclaimer](#disclaimer)
|
||||
|
||||
#### Advantages: Fragmented transmission, cross-platform, platform-independent, easy to use, no speed restrictions on the local network (up to 70+ MB/s in the LAN), supports private deployment, supports drag-and-drop sending of multiple files, and web-based file preview.
|
||||
#### Background: Consolidated from the Topic of the 20-year Graduation Project
|
||||
|
||||
#### Extensions: Provides various additional features such as local screen recording, remote screen sharing (no delay), remote audio/video calls (no delay), live streaming (no delay), password-protected rooms, cloud storage via OSS, relay service settings, WebRTC detection, WebRTC statistics, text transmission (group chat, private chat), public chat, remote drawing board, AI chat box, feature-rich backend management, real-time execution log display, robot alert notifications, and more.
|
||||
#### Introduction: (tl webrtc datachannel filetools) Transferring files on the web using WebRTC, supporting transmission of large files.
|
||||
|
||||
## Preparation (Mandatory Steps)
|
||||
#### Advantages: Chunked transmission, cross-platform, versatile usage, no speed restrictions on local networks (up to 70+ MB/s in LAN), supports private deployment, supports drag-and-drop sending of multiple files, web-based file preview.
|
||||
|
||||
Install node 14.21.x or above, and npm. Then, navigate to the project directory and run the following commands:
|
||||
#### Extensions: Many rich additional features have been added, such as local screen recording, remote screen sharing (no latency), remote audio and video calls (no latency), live streaming (no latency), password-protected rooms, OSS cloud storage, relay service configuration, WebRTC detection, WebRTC statistics, text transmission (group chat, private chat), public chat, remote whiteboard, AI chatbot, comprehensive backend management, real-time execution log display, robot alert notifications, and more.
|
||||
|
||||
## Preparation (Required Steps)
|
||||
|
||||
1. Install Node.js 14.21.x or above, and npm. Then, navigate to the project directory and run the following commands:
|
||||
|
||||
```
|
||||
cd svr/
|
||||
|
||||
npm install
|
||||
```
|
||||
|
||||
For the first run or when developing your own frontend, use either of the following commands:
|
||||
2. For the first run or when developing your own pages, you can use either of the following commands:
|
||||
|
||||
npm run build:dev (If you need to develop/modify the frontend)
|
||||
npm run build:pro (If you don't need to develop/modify the frontend)
|
||||
```
|
||||
npm run build:dev # Use this command if you need to develop/modify frontend pages
|
||||
npm run build:pro # Use this command if you don't need to develop/modify frontend pages
|
||||
```
|
||||
|
||||
## Configure WebSocket (Mandatory Step)
|
||||
3. Modify the `http.env` and `https.env` configuration files.
|
||||
|
||||
Modify the respective ws or wss configurations in cfg.json:
|
||||
## Configure WebSocket (Required Steps)
|
||||
|
||||
"ws": {
|
||||
"port": 8444, #socket port
|
||||
"host": "ws://domain or ip:port or domain:port", #socket ip, use LAN IP for the local network, and public IP for the internet
|
||||
},
|
||||
"wss" : {
|
||||
"port": 8444, #socket port
|
||||
"host": "wss://domain or ip:port or domain:port", #socket ip, use LAN IP for the local network, and public IP for the internet
|
||||
},
|
||||
Modify the relevant WebSocket configuration in `http.env` and `https.env` files.
|
||||
|
||||
Common examples:
|
||||
`http.env`
|
||||
|
||||
If you are deploying the socket service using the IP (10.1.2.3), the host will be:
|
||||
```ini
|
||||
## WebSocket server port
|
||||
tl_rtc_file_ws_port=8444
|
||||
|
||||
ws://10.1.2.3:8444 or wss://10.1.2.3:8444
|
||||
## WebSocket server address
|
||||
## "ws://domain or ip:port or domain:port"
|
||||
## For socket IP, use LAN IP/public IP. LAN IP can only be accessed within the LAN, public IP can be accessed from the internet
|
||||
tl_rtc_file_ws_host=ws://127.0.0.1:8444
|
||||
```
|
||||
|
||||
If you have a domain and configured a proxy, for example, a.test.com forwarding to the local socket service on port 8444, the host will be:
|
||||
`https.env`
|
||||
|
||||
ws://a.test.com or wss://a.test.com
|
||||
```ini
|
||||
## WebSocket server port
|
||||
tl_rtc_file_wss_port=8444
|
||||
|
||||
If you have a domain but it's not forwarded to a specific port, for example, accessing b.test.com:8444 accesses the socket service on port 8444, the host will be:
|
||||
## WebSocket server address
|
||||
## "wss://domain or ip:port or domain:port"
|
||||
## For socket IP, use LAN IP/public IP. LAN IP can only be accessed within the LAN, public IP can be accessed from the internet
|
||||
tl_rtc_file_wss_host=wss://127.0.0.1:8444
|
||||
```
|
||||
|
||||
ws://b.test.com:8444 or wss://b.test.com:8444
|
||||
## Startup (Required Steps)
|
||||
|
||||
## Startup (Mandatory Step)
|
||||
Start the following two services; choose one mode to start. The only difference between the two modes is that the HTTPS environment allows the use of audio, video, live streaming, and screen sharing features, while the other functionalities remain unaffected.
|
||||
|
||||
Start the following two services, choose one mode to start:
|
||||
For HTTP mode, access http://your-machine-ip:9092.
|
||||
|
||||
HTTP mode: After starting, access http://your-machine-ip:9092
|
||||
```
|
||||
API service: npm run http-api
|
||||
Socket service: npm run http-socket
|
||||
```
|
||||
|
||||
API service: npm run lapi
|
||||
Socket service: npm run lsocket
|
||||
For HTTPS mode, access https://your-machine-ip:9092.
|
||||
|
||||
HTTPS mode: After starting, access https://your-machine-ip:9092
|
||||
```
|
||||
API service: npm run https-api
|
||||
Socket service: npm run https-socket
|
||||
```
|
||||
|
||||
API service: npm run sapi
|
||||
Socket service: npm run ssocket
|
||||
## Configure Database (Non-Required Step)
|
||||
|
||||
## Configure TURN server (Not mandatory for LAN deployment, mandatory for internet deployment)
|
||||
Modify the database-related configuration in `http.env` and `https.env`.
|
||||
|
||||
Currently, there are two ways to generate account and password for using TURN service: fixed credentials (recommended) and time-limited credentials. **Choose one method**.
|
||||
```ini
|
||||
## Whether to enable the database
|
||||
tl_rtc_file_db_open=false
|
||||
## Database address
|
||||
tl_rtc_file_db_mysql_host=
|
||||
## Database port
|
||||
tl_rtc_file_db_mysql_port=3306
|
||||
## Database name
|
||||
tl_rtc_file_db_mysql_dbName=webchat
|
||||
## Database username
|
||||
tl_rtc_file_db_mysql_user=tlrtcfile
|
||||
## Database password
|
||||
tl_rtc_file_db_mysql_password=tlrtcfile
|
||||
```
|
||||
|
||||
## Admin Dashboard (Non-Required Step)
|
||||
|
||||
Prerequisite: Database configuration must be enabled.
|
||||
|
||||
Modify the admin dashboard-related configuration in `http.env` and `https.env`.
|
||||
|
||||
```ini
|
||||
## Admin dashboard room number
|
||||
tl_rtc_file_manage_room=tlrtcfile
|
||||
## Admin dashboard password
|
||||
tl_rtc_file_manage_password=tlrtcfile
|
||||
```
|
||||
|
||||
Access: http://localhost:9092 or http://your-machine-ip:9092, enter the configured room number and password to access the admin dashboard.
|
||||
|
||||
## Enterprise WeChat Notifications (Non-Required Step)
|
||||
|
||||
Modify the enterprise WeChat notification-related configuration in `http.env` and `https.env`.
|
||||
|
||||
```ini
|
||||
# ## Enterprise WeChat notification switch
|
||||
tl_rtc_file_notify_open=false
|
||||
## Enterprise WeChat notification robot keys, normal notifications (comma-separated if multiple keys)
|
||||
tl_rtc_file_notify_qiwei_normal=
|
||||
## Enterprise WeChat notification robot keys, error notifications (comma-separated if multiple keys)
|
||||
tl_rtc_file_notify_qiwei_error=
|
||||
```
|
||||
|
||||
## OSS Cloud Storage (Non-Required Step)
|
||||
|
||||
Modify the OSS storage-related configuration in `http.env` and `https.env`.
|
||||
|
||||
```ini
|
||||
## oss-seafile storage repository ID
|
||||
tl_rtc_file_oss_seafile_repoid=
|
||||
## oss-seafile address
|
||||
tl_rtc_file_oss_seafile_host=
|
||||
## oss-seafile username
|
||||
tl_rtc_file_oss_seafile_username=
|
||||
## oss-seafile password
|
||||
tl_rtc_file_oss_seafile_password=
|
||||
|
||||
## oss-alyun storage accessKey
|
||||
tl_rtc_file_oss_alyun_AccessKey=
|
||||
## oss-alyun storage SecretKey
|
||||
tl_rtc_file_oss_alyun_Secretkey=
|
||||
## oss-alyun storage bucket
|
||||
tl_rtc_file_oss_alyun_bucket=
|
||||
|
||||
## oss-txyun storage accessKey
|
||||
tl_rtc_file_oss_txyun_AccessKey=
|
||||
## oss-txyun storage SecretKey
|
||||
tl_rtc_file_oss_txyun_Secretkey=
|
||||
## oss-txyun storage bucket
|
||||
tl_rtc_file_oss_txyun_bucket=
|
||||
|
||||
## oss-q
|
||||
|
||||
iniuyun storage accessKey
|
||||
tl_rtc_file_oss_qiniuyun_AccessKey=
|
||||
## oss-qiniuyun storage SecretKey
|
||||
tl_rtc_file_oss_qiniuyun_Secretkey==
|
||||
## oss-qiniuyun storage bucket
|
||||
tl_rtc_file_oss_qiniuyun_bucket=
|
||||
```
|
||||
|
||||
## Chat-GPT (Non-Required Step)
|
||||
|
||||
Modify the OpenAI-related configuration in `http.env` and `https.env`.
|
||||
|
||||
```ini
|
||||
## OpenAI key(s), comma-separated if multiple keys
|
||||
tl_rtc_file_openai_keys=
|
||||
```
|
||||
|
||||
## Configure TURN Server (Non-Required Step for LAN, Required Step for Public Network)
|
||||
|
||||
Currently, there are two ways to generate credentials for using TURN service: fixed credentials (recommended) and credentials with expiration date. Choose one method.
|
||||
|
||||
Example for Ubuntu:
|
||||
|
||||
Install coturn: `sudo apt-get install coturn`
|
||||
Install Coturn: `sudo apt-get install coturn`
|
||||
|
||||
Time-limited credentials: `docker/coturn/turnserver-with-secret-user.conf`
|
||||
Valid credentials: `docker/coturn/turnserver-with-secret-user.conf`
|
||||
|
||||
1. Modify `listening-device`, `listening-ip`, `external-ip`, `static-auth-secret`, `realm` fields accordingly.
|
||||
|
||||
2. Start turnserver: `turnserver -c /complete-path/conf/turn/turnserver-with-secret-user.conf`
|
||||
1. Modify the fields `listening-device`, `listening-ip`, `external-ip`, `static-auth-secret`, and `realm`.
|
||||
2. Start TURN server: `turnserver -c /complete/path/to/conf/turn/turnserver-with-secret-user.conf`
|
||||
|
||||
Fixed credentials: `docker/coturn/turnserver-with-fixed-user.conf`
|
||||
|
||||
1. Modify `listening-device`, `listening-ip`, `external-ip`, `user`, `realm` fields accordingly.
|
||||
1. Modify the fields `listening-device`, `listening-ip`, `external-ip`, `user`, and `realm`.
|
||||
2. Generate a user: `turnadmin -a -u username -p password -r realm`
|
||||
3. Start TURN server: `turnserver -c /complete/path/to/docker/coturn/turnserver-with-secret-user.conf`
|
||||
|
||||
2. Generate user: `turnadmin -a -u username -p password -r realm-from-config`
|
||||
After deploying Coturn, set up WebRTC-related information in the corresponding `http.env` and `https.env` configurations.
|
||||
|
||||
3. Start turnserver: `turnserver -c /complete-path/docker/coturn/turnserver-with-secret-user.conf`
|
||||
```ini
|
||||
## Webrtc-stun relay service address
|
||||
tl_rtc_file_webrtc_stun_host=
|
||||
## Webrtc-turn relay service address
|
||||
tl_rtc_file_webrtc_turn_host=
|
||||
## Webrtc relay service username
|
||||
tl_rtc_file_webrtc_turn_username=tlrtcfile
|
||||
## Webrtc relay service password
|
||||
tl_rtc_file_webrtc_turn_credential=tlrtcfile
|
||||
## Webrtc relay service Secret
|
||||
tl_rtc_file_webrtc_turn_secret=tlrtcfile
|
||||
## Webrtc relay service account expiration time (milliseconds)
|
||||
tl_rtc_file_webrtc_turn_expire=86400000
|
||||
```
|
||||
|
||||
## Configure Database (Not mandatory step)
|
||||
|
||||
Modify the corresponding database configuration in cfg.json:
|
||||
|
||||
"db": {
|
||||
"open": false, # Whether to enable the database, defaults to off
|
||||
"mysql": {
|
||||
"host": "host-address",
|
||||
"port": 3306,
|
||||
"dbName": "database-name",
|
||||
"user": "username",
|
||||
"password": "password",
|
||||
"other": {
|
||||
"sequelize": {
|
||||
"dialect": "mysql",
|
||||
"host": "host-address",
|
||||
"port": 3306,
|
||||
"logging": false,
|
||||
"pool": {
|
||||
"max": 5,
|
||||
"min": 0,
|
||||
"acquire": 30000,
|
||||
"idle": 10000
|
||||
},
|
||||
"timezone": "+08:00",
|
||||
"define": {
|
||||
"freezeTableName": true,
|
||||
"underscored": true,
|
||||
"charset": "utf8",
|
||||
"collate": "utf8_general_ci",
|
||||
"timestamps": false,
|
||||
"paranoid": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
## Management Dashboard (Not mandatory step)
|
||||
|
||||
Prerequisite: Enable the database configuration.
|
||||
|
||||
Modify the room and password for the manage section in cfg.json (default room number and password are "tlrtcfile"):
|
||||
|
||||
"manage": {
|
||||
"room": "tlrtcfile",
|
||||
"password": "tlrtcfile"
|
||||
}
|
||||
|
||||
Access: http://localhost:9092 or http://your-machine-ip:9092
|
||||
|
||||
Enter the configured room number and password to access the management dashboard.
|
||||
|
||||
## Enterprise WeChat Notification (Not mandatory step)
|
||||
|
||||
Modify the qiwei array in the notify section of cfg.json and fill in the key for the Enterprise WeChat robot:
|
||||
|
||||
normal: Normal notification, error: System error notification.
|
||||
|
||||
"notify": {
|
||||
"open": true, # Whether to enable Enterprise WeChat notification
|
||||
"qiwei": {
|
||||
"normal" : [
|
||||
"key1",
|
||||
"key2"
|
||||
],
|
||||
"error" : [
|
||||
"key3",
|
||||
"key4"
|
||||
]
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
## OSS Cloud Storage (Not mandatory step)
|
||||
|
||||
Modify the oss section in cfg.json:
|
||||
|
||||
"oss": {
|
||||
"seafile": {
|
||||
"repoid": "",
|
||||
"host": "",
|
||||
"username": "account",
|
||||
"password": "password"
|
||||
},
|
||||
"alyun": {
|
||||
"AccessKey": "",
|
||||
"SecretKey": "",
|
||||
"bucket": "tl-rtc-file"
|
||||
},
|
||||
"txyun": {
|
||||
"AccessKey": "",
|
||||
"SecretKey": "",
|
||||
"bucket": "tl-rtc-file"
|
||||
},
|
||||
"qiniuyun": {
|
||||
"AccessKey": "",
|
||||
"SecretKey": "",
|
||||
"bucket": "tl-rtc-file"
|
||||
}
|
||||
}
|
||||
|
||||
## Chat-GPT (Not mandatory step)
|
||||
|
||||
Modify the openai.apiKeys in cfg.json and enter your own apiKey generated from your OpenAI account:
|
||||
|
||||
"openai": {
|
||||
"apiKeys": [
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
## Docker (Not mandatory step)
|
||||
## Docker
|
||||
|
||||
### Using Official Images:
|
||||
|
||||
Choose either of the two image modes:
|
||||
The following are basic parameters; you can refer to `http.env` and `https.env` for more parameters.
|
||||
|
||||
HTTP mode image:
|
||||
Pull the API image:
|
||||
|
||||
docker pull iamtsm/tl-rtc-file-api-local
|
||||
docker run --name=api-local -p 9092:9092 -e "WS_HOST=ws://127.0.0.1:8444" -d iamtsm/tl-rtc-file-api-local localapi
|
||||
```bash
|
||||
docker pull iamtsm/tl-rtc-file-api
|
||||
|
||||
docker pull iamtsm/tl-rtc-file-socket-local
|
||||
docker run --name=socket-local -p 8444:8444 -e "WS_HOST=ws://127.0.0.1:8444" -d iamtsm/tl-rtc-file-socket-local localsocket
|
||||
docker run --name=api -p 9092:9092 \
|
||||
-e "tl_rtc_file_env_mode=http" \
|
||||
-e "tl_rtc_file_ws_port=8444" \
|
||||
-e "tl_rtc_file_ws_host=ws://127.0.0.1:8444" \
|
||||
-d iamtsm/tl-rtc-file-api tlapi
|
||||
```
|
||||
|
||||
HTTPS mode image:
|
||||
Pull the Socket image:
|
||||
|
||||
docker pull iamtsm/tl-rtc-file-api-server
|
||||
docker run --name=api-server -p 9092:9092 -e "WSS_HOST=wss://127.0.0.1:8444" -d iamtsm/tl-rtc-file-api-server serverapi
|
||||
```bash
|
||||
docker pull iamtsm/tl-rtc-file-socket
|
||||
|
||||
docker pull iamtsm/tl-rtc-file-socket-server
|
||||
docker run --name=socket-server -p 8444:8444 -e "WSS_HOST=wss://127.0.0.1:8444" -d iamtsm/tl-rtc-file-socket-server serversocket
|
||||
docker run --name=socket -p 8444:8444 \
|
||||
-e "tl_rtc_file_env_mode=http" \
|
||||
-e "tl_rtc_file_ws_port=8444" \
|
||||
-e "tl_rtc_file_ws_host=ws://127.0.0.1:8444" \
|
||||
-d iamtsm/tl-rtc-file-socket tlsocket
|
||||
```
|
||||
|
||||
### Build Your Own Images:
|
||||
### Using Official Images (docker-compose):
|
||||
|
||||
Choose either mode and perform the respective operation:
|
||||
Start the HTTP mode image: `docker-compose --profile=http up -d`
|
||||
|
||||
HTTP mode startup:
|
||||
Start the HTTPS mode image: `docker-compose --profile=https up -d`
|
||||
|
||||
Modify the configuration information in `docker/local.env` or cfg.json as needed (ws or wss must be configured with container IP and port).
|
||||
|
||||
docker-compose --profile=local up -d
|
||||
### Build Your Own Image (docker-compose):
|
||||
|
||||
Access: http://localhost:9092 or http://your-machine-ip:9092
|
||||
After configuring `http.env` and `https.env`, go to the `docker` directory, and choose one mode to execute:
|
||||
|
||||
HTTPS mode startup:
|
||||
Build HTTP mode image:
|
||||
|
||||
Modify the configuration information in `docker/local.env` or cfg.json as needed (ws or wss must be configured with container IP and port).
|
||||
|
||||
docker-compose --profile=server up -d
|
||||
```bash
|
||||
docker-compose -f docker-compose-build-code.yml --profile=http build
|
||||
```
|
||||
|
||||
Access: https://localhost:9092 or https://your-machine-ip:9092
|
||||
Build HTTPS mode image:
|
||||
|
||||
## Other Deployment Methods
|
||||
```bash
|
||||
docker-compose -f docker-compose-build-code.yml --profile=https build
|
||||
```
|
||||
|
||||
In addition to the above manual installation, official Docker images, and self-packaged Docker images, it also supports fully automatic scripts. After downloading the project, you can go to the bin/ directory and choose the corresponding system script to execute.
|
||||
## Other Deployment Methods:
|
||||
|
||||
If the Linux script doesn't have permission, you can grant execute permission to the script first: `chmod +x bin/linux/*.sh`
|
||||
In addition to the manual installation, using official Docker images, and building Docker images yourself, there are also automatic scripts and one-click deployment options on hosting platforms.
|
||||
|
||||
### Linux Fully Automatic Script
|
||||
After downloading the project, you can navigate to the `bin/` directory and execute the appropriate script for your system. If the Linux script lacks execution permissions, you can grant it by using the `chmod +x bin/linux/*.sh` command.
|
||||
|
||||
### Linux Automatic Scripts
|
||||
|
||||
Choose one mode to start:
|
||||
|
||||
`auto-check-install-local.sh`: Automatically check and install the node environment and automatically start the HTTP mode service.
|
||||
- `auto-check-install-http.sh`: Automatically check and install Node.js environment, then start HTTP mode service.
|
||||
- `auto-check-install-https.sh`: Automatically check and install Node.js environment, then start HTTPS mode service.
|
||||
|
||||
`auto-check-install-server.sh`: Automatically check and install the node environment and automatically start the HTTPS mode service.
|
||||
|
||||
### Windows Fully Automatic Script
|
||||
### Windows Automatic Scripts
|
||||
|
||||
Choose one mode to start:
|
||||
|
||||
`auto-check-install-local.bat`: Automatically check and install the node environment and automatically start the HTTP mode service.
|
||||
- `auto-check-install-http.bat`: Automatically check and install Node.js environment, then start HTTP mode service.
|
||||
- `auto-check-install-https.bat`: Automatically check and install Node.js environment, then start HTTPS mode service.
|
||||
|
||||
`auto-check-install-server.bat`: Automatically check and install the node environment and automatically start the HTTPS mode service.
|
||||
### Zeabur Platform One-Click Deployment
|
||||
|
||||
[](https://zeabur.com/templates/898TLE?referralCode=iamtsm)
|
||||
|
||||
## Overview Diagram
|
||||
|
||||

|
||||

|
||||
|
||||
## License
|
||||
|
||||
|
Reference in New Issue
Block a user