简介
Torna 是一个开源的接口文档管理系统,支持 Swagger、Postman、Apifox 等多种格式的文档导入,在线调试接口,提供文档分享和权限管理功能,帮助团队高效管理和协作 API 文档。
安装
数据库需要 MySQL 8.2.0 及以上版本,5.7 版本不支持。
官方文档:https://torna.cn/
拉取镜像
1
| docker pull registry.cn-hangzhou.aliyuncs.com/tanghc/torna:1.23.2
|
下载配置文件
1 2 3
| yum -y install wget
mkdir /nwa/torna && wget https://gitee.com/durcframework/torna/raw/master/install/application.properties -O /nwa/torna/application.properties
|
修改配置
1
| vim /nwa/torna/application.properties
|
修改数据库连接配置,MySQL 8.x 版本可以正常使用。
启动容器
1 2 3 4 5
| docker run --name torna \ -p 7700:7700 \ -e JAVA_OPTS="-server -Xms512m -Xmx512m" \ -v /nwa/torna/application.properties:/torna/config/application.properties \ -d registry.cn-hangzhou.aliyuncs.com/tanghc/torna:1.23.2
|
记得开放 7700 端口。
访问地址
默认账号:admin,密码:123456
配置说明
application.properties 配置文件参数:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| server.port=7700
mysql.host=47.98.230.128:23308 mysql.schema=torna mysql.username=root mysql.password=027027
torna.register.enable=true
torna.jwt.timeout-days=365
torna.jwt.secret=CHezCvjte^WHy5^#MqSVx9A%6.F$eV
logging.file.name=log/server.log
spring.servlet.multipart.max-file-size=20MB
spring.servlet.multipart.max-request-size=100MB
torna.push.allow-same-folder=true
torna.push.print-content=false
torna.view-config.response-hidden-columns=required,maxLength
torna.view-config.init-order=10000
|