diff --git a/.github/README.md b/.github/README.md index 3b8c4653..cbb855b4 100644 --- a/.github/README.md +++ b/.github/README.md @@ -43,6 +43,7 @@ | 🟢 | | AList-Aria2 | https://alist.nn.ci/ | 【含Aria2插件版】一款支持多重存储的文件列表程序 | | | 🟢 | | AList-FFmpeg | https://alist.nn.ci/ | 【含FFmpeg插件版】一款支持多重存储的文件列表程序 | | | 🟢 | | ANI-RSS | https://docs.wushuo.top/ | 自动追番、订阅、下载 蜜柑RSS动漫 | | +| 🟢 | | Apifox Runner | https://apifox.com/ | 自动化测试定时任务、接口导入、Mock 服务 | | | 🟢 | | Aria2 Superng6版 | https://github.com/SuperNG6/docker-aria2/ | Docker Aria2的最佳实践 | | | 🟢 | | Artalk | https://artalk.js.org/ | 一个自托管的评论系统 | | | 🟢 | | AutoLady | https://catcat.blog/ | 自动化订阅AV影片 | | diff --git a/README.md b/README.md index e01c6117..25911d60 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ | 🟢 | | AList-Aria2 | https://alist.nn.ci/ | 【含Aria2插件版】一款支持多重存储的文件列表程序 | | | 🟢 | | AList-FFmpeg | https://alist.nn.ci/ | 【含FFmpeg插件版】一款支持多重存储的文件列表程序 | | | 🟢 | | ANI-RSS | https://docs.wushuo.top/ | 自动追番、订阅、下载 蜜柑RSS动漫 | | +| 🟢 | | Apifox Runner | https://apifox.com/ | 自动化测试定时任务、接口导入、Mock 服务 | | | 🟢 | | Aria2 Superng6版 | https://github.com/SuperNG6/docker-aria2/ | Docker Aria2的最佳实践 | | | 🟢 | | Artalk | https://artalk.js.org/ | 一个自托管的评论系统 | | | 🟢 | | AutoLady | https://catcat.blog/ | 自动化订阅AV影片 | | diff --git a/apps/apifox-runner/README.md b/apps/apifox-runner/README.md new file mode 100644 index 00000000..ca590535 --- /dev/null +++ b/apps/apifox-runner/README.md @@ -0,0 +1,56 @@ +# Apifox Runner + +自动化测试定时任务、接口导入、Mock 服务 + +![Apifox Runner](https://file.lifebus.top/imgs/apifox_runner_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) + +## 简介 + +API 设计、开发、测试一体化协作平台 + +Apifox = Postman + Swagger + Mock + JMeter + +一套系统、一份数据,解决多个 API 工具之间的数据同步问题 +只要定义好 API 文档,API 调试、API Mock、API 自动化测试即可直接使用,无需再次定义。 + +API 文档和 API 开发调试使用同一个工具,API 调试完成后即可保证和 API 文档定义完全一致。高效、及时、准确! + +## 特性 + +- [x] 可视化 API 设计 +- [x] 比 Postman 更强大 +- [x] 零门槛实现自动化测试 +- [x] 分享&发布 API 文档 +- [x] 零配置 Mock 数据 +- [x] CI/CD 持续集成 +- [x] 数据库操作 +- [x] 团队协作 +- [x] 支持 HTTP、TCP、RPC +- [x] 数据导入/导出 +- [x] 自动生成代码 + +## 安装说明 + +### 应用服务地址 + +默认值:`https://api.apifox.cn` + +部署时推荐填写公网地址,以保证应用在团队中正常运行。 + +### 访问令牌 (Access Token) + +请在ApiFox客户端,前往主窗口 `团队资源` >> `通用 Runner` 获取访问令牌 + +### 团队 ID (Team ID) + +请在ApiFox客户端,前往主窗口 `团队设置` 获取团队 ID + +### Runner ID + +请在ApiFox客户端,前往主窗口 `团队资源` >> `通用 Runner` 获取 Runner ID + +--- + +![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png) diff --git a/apps/apifox-runner/data.yml b/apps/apifox-runner/data.yml new file mode 100644 index 00000000..e969b600 --- /dev/null +++ b/apps/apifox-runner/data.yml @@ -0,0 +1,14 @@ +additionalProperties: + key: apifox-runner + name: Apifox Runner + tags: + - Runtime + - Local + shortDescZh: 自动化测试定时任务、接口导入、Mock 服务 + shortDescEn: Automated testing, scheduled tasks, interface import, Mock service + type: runtime + crossVersionUpdate: true + limit: 0 + website: https://apifox.com/ + github: https://apifox.com/ + document: https://apifox.com/help/ diff --git a/apps/apifox-runner/latest/data.yml b/apps/apifox-runner/latest/data.yml new file mode 100644 index 00000000..c6d4f041 --- /dev/null +++ b/apps/apifox-runner/latest/data.yml @@ -0,0 +1,47 @@ +additionalProperties: + formFields: + - default: "/home/apifox-runner" + edit: true + envKey: APIFOX_RUNNER_ROOT_PATH + labelZh: 数据持久化路径 + labelEn: Data persistence path + required: true + type: text + - default: 4524 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: WebUI 端口 + labelEn: WebUI port + required: true + rule: paramPort + type: number + - default: "http://127.0.0.1:4524" + edit: true + envKey: SERVER_APP_BASE_URL + labelZh: 应用服务地址 + labelEn: App Server address + required: true + type: text + - default: "" + edit: true + envKey: ACCESS_TOKEN + labelZh: 访问令牌 + labelEn: Access Token + required: true + type: text + - default: 0 + edit: true + envKey: TEAM_ID + labelZh: 团队 ID + labelEn: Team ID + required: true + rule: paramPort + type: number + - default: 0 + edit: true + envKey: RUNNER_ID + labelZh: Runner ID + labelEn: Runner ID + required: true + rule: paramPort + type: number diff --git a/apps/apifox-runner/latest/docker-compose.yml b/apps/apifox-runner/latest/docker-compose.yml new file mode 100644 index 00000000..4e70991d --- /dev/null +++ b/apps/apifox-runner/latest/docker-compose.yml @@ -0,0 +1,22 @@ +networks: + 1panel-network: + external: true + +services: + apifox-runner: + image: apifox/self-hosted-general-runner:latest + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:4524 + env_file: + - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} + - ${ENV_FILE:-/etc/1panel/envs/default.env} + volumes: + - ${APIFOX_RUNNER_ROOT_PATH}/runner:/opt/runner + environment: + - TZ=Asia/Shanghai diff --git a/apps/apifox-runner/latest/envs/default.env b/apps/apifox-runner/latest/envs/default.env new file mode 100644 index 00000000..cd05f46e --- /dev/null +++ b/apps/apifox-runner/latest/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/apps/apifox-runner/latest/envs/global.env b/apps/apifox-runner/latest/envs/global.env new file mode 100644 index 00000000..e10989fe --- /dev/null +++ b/apps/apifox-runner/latest/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/apps/apifox-runner/latest/scripts/init.sh b/apps/apifox-runner/latest/scripts/init.sh new file mode 100644 index 00000000..07fb8c3f --- /dev/null +++ b/apps/apifox-runner/latest/scripts/init.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/apifox-runner/latest/scripts/uninstall.sh b/apps/apifox-runner/latest/scripts/uninstall.sh new file mode 100644 index 00000000..c86c4fbc --- /dev/null +++ b/apps/apifox-runner/latest/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/apifox-runner/latest/scripts/upgrade.sh b/apps/apifox-runner/latest/scripts/upgrade.sh new file mode 100644 index 00000000..07fb8c3f --- /dev/null +++ b/apps/apifox-runner/latest/scripts/upgrade.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/apifox-runner/logo.png b/apps/apifox-runner/logo.png new file mode 100644 index 00000000..2aa3008c Binary files /dev/null and b/apps/apifox-runner/logo.png differ