发布应用 Synapse

Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
新疆萌森软件开发工作室 2024-10-30 16:16:27 +08:00
parent 135658cc72
commit 156063ee2b
10 changed files with 166 additions and 0 deletions

1
.github/README.md vendored
View File

@ -153,6 +153,7 @@
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/stream-rec/logo.png" width="22"/> | Stream-Rec | https://github.com/hua0512/stream-rec/ | Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/stream-rec/logo.png" width="22"/> | Stream-Rec Web版 | https://github.com/hua0512/stream-rec/ | 【前端版】Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/stream-rec/logo.png" width="22"/> | Stream-Rec 服务版 | https://github.com/hua0512/stream-rec/ | 【服务版】Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/synapse/logo.png" width="22"/> | Synapse | https://matrix.org/ | 用于安全、分散通信的开放网络 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/tangsengdaodao/logo.png" width="22"/> | 唐僧叨叨 | https://tsdaodao.com/ | 让企业轻松拥有自己的即时通讯 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/teemii/logo.png" width="22"/> | Teemii | https://www.teemii.io/ | 漫画阅读器和管理器 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/telegram-bot-api/logo.png" width="22"/> | Telegram Bot Api | https://telegram.org/ | 自建 Telegram Bot API 服务器 | |

View File

@ -136,6 +136,7 @@
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/stream-rec/logo.png" width="22"/> | Stream-Rec | https://github.com/hua0512/stream-rec/ | Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/stream-rec/logo.png" width="22"/> | Stream-Rec Web版 | https://github.com/hua0512/stream-rec/ | 【前端版】Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/stream-rec/logo.png" width="22"/> | Stream-Rec 服务版 | https://github.com/hua0512/stream-rec/ | 【服务版】Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/synapse/logo.png" width="22"/> | Synapse | https://matrix.org/ | 用于安全、分散通信的开放网络 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/tangsengdaodao/logo.png" width="22"/> | 唐僧叨叨 | https://tsdaodao.com/ | 让企业轻松拥有自己的即时通讯 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/teemii/logo.png" width="22"/> | Teemii | https://www.teemii.io/ | 漫画阅读器和管理器 | |
| 🟢 | <img height="22" src="https://file.lifebus.top/apps/telegram-bot-api/logo.png" width="22"/> | Telegram Bot Api | https://telegram.org/ | 自建 Telegram Bot API 服务器 | |

View File

@ -0,0 +1,10 @@
additionalProperties:
formFields:
- default: 8008
edit: true
envKey: PANEL_APP_PORT_HTTP
labelZh: 访问端口
labelEn: Port
required: true
rule: paramPort
type: number

View File

@ -0,0 +1,20 @@
networks:
1panel-network:
external: true
services:
synapse:
image: matrixdotorg/synapse:v1.118.0
container_name: ${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:8008
env_file:
- /etc/1panel/envs/global.env
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ./data:/data

View File

@ -0,0 +1,26 @@
#!/bin/bash
if [ -f .env ]; then
source .env
# setup-1 add default values
CURRENT_DIR=$(pwd)
sed -i '/^ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
# setup-2 generate key
mkdir -p "${CURRENT_DIR}/data"
docker run -it --rm \
--mount type=bind,src="${CURRENT_DIR}/data",dst=/data \
-e SYNAPSE_SERVER_NAME="$DOMAIN_NAME" \
-e SYNAPSE_REPORT_STATS=no \
matrixdotorg/synapse:latest generate
# setup-3 check permission
chmod -R 777 "${CURRENT_DIR}/data"
echo "Check Finish."
else
echo "Error: .env file not found."
fi

View File

@ -0,0 +1,10 @@
#!/bin/bash
if [ -f .env ]; then
source .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi

View File

@ -0,0 +1,15 @@
#!/bin/bash
if [ -f .env ]; then
source .env
# setup-1 add default values
CURRENT_DIR=$(pwd)
sed -i '/^ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi

68
apps/synapse/README.md Normal file
View File

@ -0,0 +1,68 @@
# Synapse
Synapse 是一个开源的 Matrix 家庭服务器实现,由 Element 开发和维护。Matrix 是安全且可互操作实时通信的开放标准。
![Synapse](https://file.lifebus.top/imgs/synapse_cover.png)
![](https://img.shields.io/badge/%E6%96%B0%E7%96%86%E8%90%8C%E6%A3%AE%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E5%AE%A4-%E6%8F%90%E4%BE%9B%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81-blue)
## 安装说明
### 快捷命令
#### 查看帮助
```sh
register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml --help
```
#### 生成管理员用户
> 请替换以下参数
>
> adminName: 管理员用户名
>
> password: 管理员密码
```sh
register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml -u adminName -p password -a
```
#### 生成普通用户
> 请替换以下参数
>
> userName: 用户名
>
> password: 密码
```sh
register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml -u userName -p password
```
## 反向代理
> Nginx
```nginx
location ~ ^(/_matrix|/_synapse/client) {
# note: do not add a path (even a single /) after the port in `proxy_pass`,
# otherwise nginx will canonicalise the URI and cause signature verification
# errors.
proxy_pass http://localhost:8008;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
# Nginx by default only allows file uploads up to 1M in size
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
client_max_body_size 50M;
# Synapse responses may be chunked, which is an HTTP/1.1 feature.
proxy_http_version 1.1;
}
```
---
![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png)

15
apps/synapse/data.yml Normal file
View File

@ -0,0 +1,15 @@
additionalProperties:
key: synapse
name: Synapse
tags:
- WebSite
- Middleware
- Local
shortDescZh: 用于安全、分散通信的开放网络
shortDescEn: An open network for secure, decentralised communication
type: website
crossVersionUpdate: true
limit: 0
website: https://matrix.org/
github: https://github.com/matrix-org/synapse/
document: https://matrix.org/

BIN
apps/synapse/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB