Spaces:
Runtime error
Runtime error
AlbertFan0918 commited on
Commit ·
4f80cc3
1
Parent(s): 814432d
Deploy to HF
Browse files- Dockerfile +1 -1
- README.md +1 -1
- homeserver.yaml +0 -2
- pi490708-privatechat.hf.space.log.config +39 -0
Dockerfile
CHANGED
|
@@ -39,4 +39,4 @@ USER 991
|
|
| 39 |
# 7. 【核心修复】使用 ENTRYPOINT 覆盖默认启动脚本
|
| 40 |
# 这样 Docker 就不会去调原来的 /start.py,而是直接运行我们的 shell 命令
|
| 41 |
# 命令逻辑:先替换变量生成 yaml,然后手动调用 /start.py 启动服务
|
| 42 |
-
ENTRYPOINT ["/bin/sh", "-c", "envsubst < /data/homeserver.yaml.template > /data/homeserver.yaml && /start.py run"]
|
|
|
|
| 39 |
# 7. 【核心修复】使用 ENTRYPOINT 覆盖默认启动脚本
|
| 40 |
# 这样 Docker 就不会去调原来的 /start.py,而是直接运行我们的 shell 命令
|
| 41 |
# 命令逻辑:先替换变量生成 yaml,然后手动调用 /start.py 启动服务
|
| 42 |
+
ENTRYPOINT ["/bin/sh", "-c", "envsubst < /data/homeserver.yaml.template > /data/homeserver.yaml && /start.py run"]/homeserver.yaml && /start.py run"]
|
README.md
CHANGED
|
@@ -9,5 +9,5 @@ license: mit
|
|
| 9 |
app_port: 7860
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# My
|
| 13 |
基于 Synapse 的加密聊天服务器。
|
|
|
|
| 9 |
app_port: 7860
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# My Matrix Chat Server
|
| 13 |
基于 Synapse 的加密聊天服务器。
|
homeserver.yaml
CHANGED
|
@@ -10,7 +10,6 @@
|
|
| 10 |
# each option, go to docs/usage/configuration/config_documentation.md or
|
| 11 |
# https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html
|
| 12 |
server_name: "pi490708-chat-server.hf.space"
|
| 13 |
-
|
| 14 |
# 允许 Synapse Admin 等外部网页工具连接
|
| 15 |
enable_cors: true
|
| 16 |
|
|
@@ -22,7 +21,6 @@ enable_registration_without_verification: true
|
|
| 22 |
|
| 23 |
# 【可选】顺手把日志里的另一个警告也消掉
|
| 24 |
suppress_key_server_warning: true
|
| 25 |
-
|
| 26 |
pid_file: /data/homeserver.pid
|
| 27 |
listeners:
|
| 28 |
- port: 7860 # 必须是 7860
|
|
|
|
| 10 |
# each option, go to docs/usage/configuration/config_documentation.md or
|
| 11 |
# https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html
|
| 12 |
server_name: "pi490708-chat-server.hf.space"
|
|
|
|
| 13 |
# 允许 Synapse Admin 等外部网页工具连接
|
| 14 |
enable_cors: true
|
| 15 |
|
|
|
|
| 21 |
|
| 22 |
# 【可选】顺手把日志里的另一个警告也消掉
|
| 23 |
suppress_key_server_warning: true
|
|
|
|
| 24 |
pid_file: /data/homeserver.pid
|
| 25 |
listeners:
|
| 26 |
- port: 7860 # 必须是 7860
|
pi490708-privatechat.hf.space.log.config
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: 1
|
| 2 |
+
|
| 3 |
+
formatters:
|
| 4 |
+
precise:
|
| 5 |
+
|
| 6 |
+
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
handlers:
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
console:
|
| 13 |
+
class: logging.StreamHandler
|
| 14 |
+
formatter: precise
|
| 15 |
+
|
| 16 |
+
loggers:
|
| 17 |
+
# This is just here so we can leave `loggers` in the config regardless of whether
|
| 18 |
+
# we configure other loggers below (avoid empty yaml dict error).
|
| 19 |
+
_placeholder:
|
| 20 |
+
level: "INFO"
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
synapse.storage.SQL:
|
| 25 |
+
# beware: increasing this to DEBUG will make synapse log sensitive
|
| 26 |
+
# information such as access tokens.
|
| 27 |
+
level: INFO
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
root:
|
| 33 |
+
level: INFO
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
handlers: [console]
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
disable_existing_loggers: false
|