支持 https://github.com/matrix-org/matrix-public-archive
git clone或下载此存储库作为存档并解压,然后按照以下说明进行操作。
go get github.com/valyala/quicktemplate/qtc
qtc
mkdir bin && go build -o bin/ ./cmd/...
docker build -t matrix-static .
docker run -v $( pwd ) /config.json:/opt/matrix-static/config.json -p 8000:8000 -it matrix-static或对于 Windows:
docker run -v %cd%/config.json:/opt/matrix-static/config.json -p 8000:8000 -it matrix-static并将任何命令行参数传递到命令末尾。
首先,您必须创建一个配置,提供了一个示例 json 文件,或者您可以使用帮助程序二进制文件register-guest在给定的主服务器上注册来宾并编写适当的配置文件。
register-guest采用以下选项:
--config-file=指定配置文件,默认为./config.json 。
--homeserver-url=指定要使用的 Homeserver URL,默认为https://matrix.org 。
主要的二进制matrix-static显示以下控件:
接受PORT= env 变量来确定要使用的端口,如果未指定,则默认为端口 8000。如果端口正在使用中,将会出现恐慌。
接受以下命令行参数:
--config-file=指定配置文件,默认为./config.json 。
--enable-pprof如果设置,则启用/debug/pprof端点进行调试。
--enable-prometheus-metrics如果设置,则启用指标的/metrics端点。
--num-workers=指定启动的worker goroutine数量,默认为32。
--public-serve-prefix=指定用于面向用户的 html 服务路由的路由器前缀,默认为/ 。
--logger-directory指定输出日志的位置。
--cache-ttl指定自上次访问以来将房间保留在内存中并保持最新状态的时间,默认为 30 分钟。
--cache-min-rooms指定始终保留在内存中的最小房间数,默认为 10。
目前托管在 https://view.matrix.org
讨论矩阵室是#matrix-static:matrix.org