{"id":15723422,"url":"https://github.com/caomeiyouren/push-all-in-cloud","last_synced_at":"2025-05-13T04:36:51.947Z","repository":{"id":254840059,"uuid":"823637695","full_name":"CaoMeiYouRen/push-all-in-cloud","owner":"CaoMeiYouRen","description":"基于 push-all-in-one 和 hono 开发的云函数推送服务。支持 nodejs/docker/vercel 等多种部署方式","archived":false,"fork":false,"pushed_at":"2025-04-30T21:53:58.000Z","size":2087,"stargazers_count":14,"open_issues_count":1,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-30T22:34:31.452Z","etag":null,"topics":["docker","hono","nodejs","notifications","push","push-notifications","vercel"],"latest_commit_sha":null,"homepage":"https://push.cmyr.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CaoMeiYouRen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-03T12:17:12.000Z","updated_at":"2025-04-30T21:53:56.000Z","dependencies_parsed_at":"2024-11-25T13:18:51.589Z","dependency_job_id":"4e13a685-b4c4-47b3-9b25-052d96ac7e59","html_url":"https://github.com/CaoMeiYouRen/push-all-in-cloud","commit_stats":{"total_commits":115,"total_committers":3,"mean_commits":"38.333333333333336","dds":0.3739130434782608,"last_synced_commit":"7e5511d791d37a5694d521cc35caa03cfacb10b0"},"previous_names":["caomeiyouren/push-all-in-cloud"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaoMeiYouRen%2Fpush-all-in-cloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaoMeiYouRen%2Fpush-all-in-cloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaoMeiYouRen%2Fpush-all-in-cloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaoMeiYouRen%2Fpush-all-in-cloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CaoMeiYouRen","download_url":"https://codeload.github.com/CaoMeiYouRen/push-all-in-cloud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253877362,"owners_count":21977634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","hono","nodejs","notifications","push","push-notifications","vercel"],"created_at":"2024-10-03T22:11:36.108Z","updated_at":"2025-05-13T04:36:51.910Z","avatar_url":"https://github.com/CaoMeiYouRen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003epush-all-in-cloud \u003c/h1\u003e\n\u003cp\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/github/package-json/v/CaoMeiYouRen/push-all-in-cloud.svg\" /\u003e\n  \u003ca href=\"https://hub.docker.com/r/caomeiyouren/push-all-in-cloud\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Docker Pulls\" src=\"https://img.shields.io/docker/pulls/caomeiyouren/push-all-in-cloud\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/CaoMeiYouRen/push-all-in-cloud/actions?query=workflow%3ARelease\" target=\"_blank\"\u003e\n    \u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/CaoMeiYouRen/push-all-in-cloud/release.yml?branch=master\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/node-%3E%3D18-blue.svg\" /\u003e\n  \u003ca href=\"https://github.com/CaoMeiYouRen/push-all-in-cloud#readme\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/CaoMeiYouRen/push-all-in-cloud/graphs/commit-activity\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/CaoMeiYouRen/push-all-in-cloud/blob/master/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: AGPL-3.0\" src=\"https://img.shields.io/github/license/CaoMeiYouRen/push-all-in-cloud?color=yellow\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n\n\u003e 基于 [push-all-in-one](https://github.com/CaoMeiYouRen/push-all-in-one) 和 hono 开发的云函数推送服务。支持 nodejs/docker/vercel 等部署方式\n\n**重大更新提示：** `push-all-in-cloud` v2 版本不兼容 v1 及以下低版本，请查看 [CHANGELOG](https://github.com/CaoMeiYouRen/push-all-in-cloud/blob/master/CHANGELOG.md) 了解改动。\n\n## 🏠 主页\n\n[https://github.com/CaoMeiYouRen/push-all-in-cloud#readme](https://github.com/CaoMeiYouRen/push-all-in-cloud#readme)\n\n## 🌰 Demo\n\nhttps://push.cmyr.dev\n\n主页自带 push-all-in-one 和 push-all-in-cloud 通用配置生成器，提供在线调试功能。\n\n\n## 📦 依赖要求\n\n\n- node \u003e=18\n- pnpm \u003e= 9\n\n## 🚀 部署\n\n### Vercel 部署（推荐）\n\n\u003e 如果遇到了点击 `推送` 按钮长时间无响应/超时的问题，请在 Vercel 控制台中将环境变量`NODEJS_HELPERS`设置为 `0` 后，重新部署，再进行测试。\n\n 点击以下按钮一键部署到 Vercel。\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FCaoMeiYouRen%2Fpush-all-in-cloud.git)\n\n### Docker 镜像\n\n支持两种注册表：\n\n- Docker Hub: [`caomeiyouren/push-all-in-cloud`](https://hub.docker.com/r/caomeiyouren/push-all-in-cloud)\n- GitHub: [`ghcr.io/caomeiyouren/push-all-in-cloud`](https://github.com/CaoMeiYouRen/push-all-in-cloud/pkgs/container/push-all-in-cloud)\n\n支持以下架构：\n\n- `linux/amd64`\n- `linux/arm64`\n\n有以下几种 tags：\n\n| Tag            | 描述     | 举例          |\n| :------------- | :------- | :------------ |\n| `latest`       | 最新     | `latest`      |\n| `{YYYY-MM-DD}` | 特定日期 | `2024-06-07`  |\n| `{sha-hash}`   | 特定提交 | `sha-0891338` |\n| `{version}`    | 特定版本 | `1.2.3`       |\n\n### Docker Compose 部署\n\n下载 [docker-compose.yml](https://github.com/CaoMeiYouRen/push-all-in-cloud/blob/master/docker-compose.yml)\n\n```sh\nwget https://raw.githubusercontent.com/CaoMeiYouRen/push-all-in-cloud/refs/heads/master/docker-compose.yml\n```\n\n检查有无需要修改的配置\n\n```sh\nvim docker-compose.yml  # 也可以是你喜欢的编辑器\n```\n\n\u003e 在公网部署时请务必修改 AUTH_PUSH_KEY、AUTH_FORWARD_KEY 环境变量\n\n启动\n\n```sh\ndocker-compose up -d\n```\n\n在浏览器中打开 `http://{Server IP}:3000` 即可查看结果\n\n### Node.js 部署\n\n确保本地已安装 Node.js 和 pnpm。\n\n```sh\n# 下载源码\ngit clone https://github.com/CaoMeiYouRen/push-all-in-cloud.git  --depth=1\ncd push-all-in-cloud\n# 安装依赖\npnpm i --frozen-lockfile\n# 构建项目\npnpm build\n# 启动项目\npnpm start\n```\n\n在浏览器中打开 `http://{Server IP}:3000` 即可查看结果\n\n## 👨‍💻 使用\n\n如果在本地部署，基础路径为 `http://localhost:3000`\n\n在服务器或云函数部署则为  `http(s)://{Server IP}`。\n\n例如：\n\n如果基础路径为 `https://example.vercel.app`，则 `/push` 的完整路径为 `https://example.vercel.app/push`\n\n### 接口说明\n\n| 路径     | 请求方法 | 请求格式         | 请求内容    | 响应内容        | 说明                                                         |\n| -------- | -------- | ---------------- | ----------- | --------------- | ------------------------------------------------------------ |\n| /push    | POST     | application/json | PushBody    | PushResponse    | 将消息推送到服务端配置的多个推送渠道。使用本方式需要配置环境变量 |\n| /forward | POST     | application/json | ForwardBody | ForwardResponse | 将消息转发到目标推送渠道。使用本方式无需配置环境变量，但需要在推送时设置推送渠道 |\n\n\n```ts\ntype PushBody = {\n    title: string\n    desp?: string\n}\n\ntype PushType = \"ServerChanTurbo\" | \"Dingtalk\" | \"CustomEmail\" | \"WechatRobot\" | \"WechatApp\" | \"PushPlus\" | \"IGot\" | \"Qmsg\" | \"XiZhi\" | \"PushDeer\" | \"Discord\" | \"Telegram\" | \"OneBot\"\n\ntype ForwardBody = {\n    title: string\n    desp?: string\n    // config 相关配置请参考 MetaPushConfig 的类型定义\n} \u0026 MetaPushConfig\u003cPushType\u003e\n\ntype PushResponse = {\n    message: string\n    data: PromiseSettledResult\u003cPick\u003cAxiosResponse\u003cany\u003e, 'data' | 'headers' | 'status' | 'statusText'\u003e\u003e[]\n}\n\ntype ForwardResponse = {\n    message: string\n    data: Pick\u003cAxiosResponse\u003cany\u003e, 'data' | 'headers' | 'status' | 'statusText'\u003e\n}\n```\n\n\n### /push 接口调用例子\n\n```ts\n// 注意：/push 接口需要先配置环境变量！！！\nconst url = 'http://your-server-address/push'; // 请将 http://your-server-address 替换为真实地址！\nconst authToken = 'your-auth-push-key'; // 请将 your-auth-push-key 替换为真实 AUTH_PUSH_KEY\n\nconst payload = {\n    title: '测试推送标题',\n    desp: '这是测试推送的内容'\n};\n\nfetch(url, {\n    method: 'POST',\n    headers: {\n        'Content-Type': 'application/json',\n        'Authorization': `Bearer ${authToken}`\n    },\n    body: JSON.stringify(payload)\n})\n.then(response =\u003e response.json())\n.then(data =\u003e console.log(data))\n.catch(error =\u003e console.error('Error:', error));\n```\n\n### /forward 接口调用例子\n\n提示：可以前往 [push-all-in-cloud 配置生成器](https://push.cmyr.dev/) 在线生成 push-all-in-one 和 push-all-in-cloud 通用配置。\n\n```ts\nconst url = 'http://your-server-address/forward'; // 请将 http://your-server-address 替换为真实地址！\nconst authToken = 'your-auth-forward-key'; // 请将 your-auth-forward-key 替换为真实 AUTH_FORWARD_KEY\n\nconst payload = {\n    title: '测试推送标题',\n    desp: '这是测试推送的内容',\n    type: 'Telegram', // 选择推送渠道，例如 Telegram\n    config: { // 构造函数配置项。如果不知道怎么填，请前往 'push-all-in-cloud 配置生成器' 查看\n        TELEGRAM_BOT_TOKEN: 'your-telegram-bot-token',\n        TELEGRAM_CHAT_ID: 'your-telegram-chat-id'\n    },\n    option: {} // 附加参数选项。如果不知道怎么填，请前往 'push-all-in-cloud 配置生成器' 查看\n};\n\nfetch(url, {\n    method: 'POST',\n    headers: {\n        'Content-Type': 'application/json',\n        'Authorization': `Bearer ${authToken}`\n    },\n    body: JSON.stringify(payload)\n})\n.then(response =\u003e response.json())\n.then(data =\u003e console.log(data))\n.catch(error =\u003e console.error('Error:', error));\n```\n\n### 环境变量配置\n\n| 环境变量                  | 说明                                                         |\n| ------------------------- | ------------------------------------------------------------ |\n| PORT                      | 运行端口                                                     |\n| AUTH_PUSH_KEY             | 【建议设置】访问 /push 路由，执行推送请求需要的 key。验证方式为 `Bearer Auth`。由于该路由需要在环境变量配置推送渠道，所以不设置该项将有接口被盗刷的风险。 |\n| AUTH_FORWARD_KEY          | 访问 /forward 路由，执行转发推送需要的 key。验证方式为 `Bearer Auth`。 |\n| SERVER_CHAN_TURBO_SENDKEY | Server 酱·Turbo  SCTKEY。官方文档：https://sct.ftqq.com/     |\n| SERVER_CHAN_V3_SENDKEY    | Server 酱³ 的 sendkey。官方文档：https://sc3.ft07.com/doc    |\n| EMAIL_AUTH_USER           | 自定义邮箱。发件邮箱                                         |\n| EMAIL_AUTH_PASS           | 发件授权码(或密码)                                           |\n| EMAIL_HOST                | 发件域名                                                     |\n| EMAIL_PORT                | 发件端口                                                     |\n| EMAIL_TO_ADDRESS          | 收件邮箱                                                     |\n| DINGTALK_ACCESS_TOKEN     | 【推荐】钉钉机器人 access_token。官方文档：https://developers.dingtalk.com/document/app/custom-robot-access |\n| DINGTALK_SECRET           | 钉钉机器人加签安全秘钥（HmacSHA256）                         |\n| WECHAT_ROBOT_KEY          | 企业微信群机器人。官方文档：https://work.weixin.qq.com/help?person_id=1\u0026doc_id=13376 |\n| WECHAT_ROBOT_MSG_TYPE     | 消息类型，默认 `text`                                        |\n| WECHAT_APP_CORPID         | 【推荐】企业微信企业 ID，获取方式参考 https://work.weixin.qq.com/api/doc/90000/90135/91039#14953/corpid |\n| WECHAT_APP_AGENTID        | 企业应用的 id。企业内部开发，可在应用的设置页面查看          |\n| WECHAT_APP_SECRET         | 应用的凭证密钥，获取方式参考：https://work.weixin.qq.com/api/doc/90000/90135/91039#14953/secret |\n| WECHAT_APP_USERID         | 指定接收消息的成员。若不指定则默认为 ”@all”。                |\n| FEISHU_APP_ID             | 飞书应用 ID。官方文档：https://open.feishu.cn/document/home/index |\n| FEISHU_APP_SECRET         | 飞书应用 Secret                                              |\n| FEISHU_RECEIVE_ID         | 飞书消息接收者的 ID，ID 类型与查询参数 `receive_id_type` 的取值一致。 |\n| FEISHU_RECEIVE_ID_TYPE    | 飞书用户 ID 类型                                             |\n| FEISHU_MSG_TYPE           | 飞书消息类型。                                               |\n| PUSH_PLUS_TOKEN           | pushplus 推送加开放平台。官方文档：http://pushplus.hxtrip.com/doc/ |\n| PUSH_PLUS_TEMPLATE_TYPE   | 发送消息模板，默认为 html                                    |\n| PUSH_PLUS_CHANNEL_TYPE    | 发送渠道，默认为 wechat                                      |\n| I_GOT_KEY                 | iGot 推送，官方文档：https://wahao.github.io/Bark-MP-helper  |\n| QMSG_KEY                  | Qmsg 酱 推送，官方文档：https://qmsg.zendee.cn               |\n| XI_ZHI_KEY                | 息知 推送，官方文档：https://xz.qqoq.net/#/index             |\n| PUSH_DEER_PUSH_KEY        | 【推荐】PushDeer 推送，官方文档：https://github.com/easychen/pushdeer |\n| DISCORD_WEBHOOK           | 【推荐】Discord Webhook Url 可在服务器设置 -\u003e 整合 -\u003e Webhook -\u003e 创建 Webhook 中获取。官方文档：https://support.discord.com/hc/zh-tw/articles/228383668-%E4%BD%BF%E7%94%A8%E7%B6%B2%E7%B5%A1%E9%89%A4%E6%89%8B-Webhooks- |\n| DISCORD_USERNAME          | 机器人显示的名称                                             |\n| TELEGRAM_BOT_TOKEN        | 【推荐】Telegram Bot 机器人令牌。您可以从 https://t.me/BotFather 获取 Token。官方文档：https://core.telegram.org/bots/api#making-requests |\n| TELEGRAM_CHAT_ID          | 支持对话/群组/频道的 Chat ID。您可以转发消息到 https://t.me/JsonDumpBot 获取 Chat ID |\n| ONE_BOT_BASE_URL          | OneBot 推送。OneBot HTTP 基础路径。官方文档：https://github.com/botuniverse/onebot-11 |\n| ONE_BOT_ACCESS_TOKEN      | OneBot AccessToken                                           |\n| ONE_BOT_MSG_TYPE          | 消息类型   'private' 或 'group'                              |\n| ONE_BOT_RECIEVER_ID       | 用户/群组 ID，即 QQ 号或群号                                 |\n| NTFY_URL                  | ntfy 推送地址                                                |\n| NTFY_TOPIC                | ntfy 主题                                                    |\n| NTFY_AUTH                 | ntfy 认证参数                                                |\n| WX_PUSHER_APP_TOKEN       | WxPusher appToken。在 https://wxpusher.zjiecode.com/admin/main/app/appToken 申请。 |\n| WX_PUSHER_UID             | WxPusher uid。在 https://wxpusher.zjiecode.com/admin/main/wxuser/list 查看。 |\n\n## 🛠️ 开发\n\n```sh\nnpm run dev\n```\n\n## 🔧 编译\n\n```sh\nnpm run build\n```\n\n## 🔍 Lint\n\n```sh\nnpm run lint\n```\n\n\n## 👤 作者\n\n\n**CaoMeiYouRen**\n\n* Website: [https://blog.cmyr.ltd/](https://blog.cmyr.ltd/)\n\n* GitHub: [@CaoMeiYouRen](https://github.com/CaoMeiYouRen)\n\n\n## 🤝 贡献\n\n欢迎 贡献、提问或提出新功能！\u003cbr /\u003e如有问题请查看 [issues page](https://github.com/CaoMeiYouRen/push-all-in-cloud/issues). \u003cbr/\u003e贡献或提出新功能可以查看[contributing guide](https://github.com/CaoMeiYouRen/push-all-in-cloud/blob/master/CONTRIBUTING.md).\n\n## 💰 支持\n\n如果觉得这个项目有用的话请给一颗⭐️，非常感谢\n\n## 🌟 Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=CaoMeiYouRen/push-all-in-cloud\u0026type=Date)](https://star-history.com/#CaoMeiYouRen/push-all-in-cloud\u0026Date)\n\n## 📝 License\n\nCopyright © 2024 [CaoMeiYouRen](https://github.com/CaoMeiYouRen).\u003cbr /\u003e\nThis project is [AGPL-3.0](https://github.com/CaoMeiYouRen/push-all-in-cloud/blob/master/LICENSE) licensed.\n\n***\n\n_This README was generated with ❤️ by [cmyr-template-cli](https://github.com/CaoMeiYouRen/cmyr-template-cli)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaomeiyouren%2Fpush-all-in-cloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaomeiyouren%2Fpush-all-in-cloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaomeiyouren%2Fpush-all-in-cloud/lists"}