Skip to content

Commit 61b3868

Browse files
committed
更新文档
1 parent d339854 commit 61b3868

File tree

4 files changed

+16
-22
lines changed

4 files changed

+16
-22
lines changed

README.md

+13-19
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Documentation: [English version](https://github.com/luolongfei/freenom/blob/main
2626

2727
[🐳 通过 Docker 方式部署](#-通过-docker-部署)(推荐,最简单的部署方式之一)
2828

29-
[🚈 通过 Railway 部署](#-通过-Railway-部署)
29+
[🧊 通过 Heroku 部署](#-通过-Heroku-部署)(推荐没有自己服务器的用户使用此方案,一键部署)
3030

31-
[🧊 通过 Heroku 部署](#-通过-Heroku-部署)
31+
[🚈 通过 Railway 部署](#-通过-Railway-部署)
3232

33-
[☁ 通过 各种云函数 部署](#-通过各种云函数部署)(由于 Railway 和 Heroku 都增加了每月时长限制,故目前想完全免费部署,暂时只有云函数可选)
33+
[☁ 通过 各种云函数 部署](#-通过各种云函数部署)
3434

3535
[🚧 直接拉取源码部署](#-直接拉取源码部署)
3636

@@ -408,30 +408,24 @@ systemctl restart docker
408408

409409
***
410410

411-
### 🚈 通过 Railway 部署
412-
413-
*由于 Railway 在几天前更新了服务条款,每月增加了使用时长限制,* **故不再推荐使用此方式部署。** 新的服务条款导致每月最多只能运行 21 天左右,详细条款内容参考 [此处](https://docs.railway.app/reference/pricing#execution-time-limit)
414-
415-
目前,手里没有服务器的情况下,如果想完全免费部署,暂时只能考虑迁移至 阿里云函数 或者 华为云函数,请参考 [☁ 通过 各种云函数 部署](#-通过各种云函数部署) 等相关内容。
411+
### 🧊 通过 Heroku 部署
416412

417-
有关 【通过 Railway 部署】
418-
的具体操作步骤请参考 [此处](https://github.com/luolongfei/freenom/wiki/%E9%80%9A%E8%BF%87-Railway-%E9%83%A8%E7%BD%B2)
413+
*推荐没有自己服务器的用户使用此方案部署。Heroku 可以说是业界良心。*
419414

420-
***
415+
**如果你是新手,请务必参考** 有关 【通过 Heroku 部署】 的具体操作步骤,点击 [此处](https://github.com/luolongfei/freenom/wiki/%E9%80%9A%E8%BF%87-Heroku-%E9%83%A8%E7%BD%B2) 查看。
421416

422-
### 🧊 通过 Heroku 部署
417+
如果你是老手,也可以直接点击下方按钮,可以一键部署到 Heroku
423418

424-
*由于休眠问题以及 Cron 问题还没有比较完美的解决方案,故暂时不推荐通过这种方式部署。*
419+
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
425420

426-
点击下方按钮,可以一键部署到 Heroku,不过由于 Heroku 免费版本每 30 分钟休眠,你可以将创建的 app 地址交给 [https://kaffeine.herokuapp.com](https://kaffeine.herokuapp.com/) ,让它每隔一段时间就 ping 一下你的地址,使得你的容器保持唤醒状态。而 Heroku 容器每个月最多只能清醒 500 个小时,所以还是会面临休眠问题。除非你验证信用卡以获取 1000 小时运行时长。
421+
***
427422

428-
**注意,Heroku 还有个不太好处理的问题,在容器内部似乎不能正常使用 Cron 计划任务,可能跟每次由不同用户启动容器,且每次容器都位于不同的机器有关。只能使用 Heroku 提供的调度器,很不灵活,或者借助代码实现与 Cron 类似的功能。参考:**
423+
### 🚈 通过 Railway 部署
429424

430-
> [https://stackoverflow.com/a/2611936](https://stackoverflow.com/a/2611936)
431-
>
432-
> [https://medartus.medium.com/how-to-use-cron-on-heroku-for-free-778d8602a622](https://medartus.medium.com/how-to-use-cron-on-heroku-for-free-778d8602a622)
425+
*由于 Railway 已更新服务条款,每月增加了使用时长限制,* **故不再推荐使用此方式部署。** 新的服务条款导致每月最多只能运行 21 天左右,详细条款内容参考 [此处](https://docs.railway.app/reference/pricing#execution-time-limit)
433426

434-
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
427+
有关 【通过 Railway 部署】
428+
的具体操作步骤请参考 [此处](https://github.com/luolongfei/freenom/wiki/%E9%80%9A%E8%BF%87-Railway-%E9%83%A8%E7%BD%B2)
435429

436430
***
437431

app.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"required": false
1616
},
1717
"FF_TOKEN": {
18-
"description": "令牌,在触发执行的时候,需要跟上此参数的值。假设 FF_TOKEN 的值为 123,则传参的格式为 https://xxx.herokuapp.com/?ff-token=123",
19-
"value": ""
18+
"description": "令牌,用于验证执行者身份,防止别人恶意触发执行续期任务。假设 FF_TOKEN 的值为 123,你的应用地址为 https://xxx.herokuapp.com,则后续在 Uptimerobot 创建任务的时候 URL 就填 https://xxx.herokuapp.com/?ff-token=123",
19+
"value": "20190214"
2020
},
2121
"FREENOM_USERNAME": {
2222
"description": "Freenom 账户 Freenom Account",

heroku/web/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class="mdui-img-fluid"
164164
}
165165

166166
echo '<p>执行完了</p>';
167-
echo '<p>Made with <i class="mdui-icon material-icons mdui-text-color-pink-a200">favorite</i> by <a class="mdui-text-color-white-text" href="https:\/\/github.com/luolongfei" target="_blank">luolongfei</a></p>';
167+
echo '<p>Made with <i class="mdui-icon material-icons mdui-text-color-pink-a200 shake">favorite</i> by <a class="mdui-text-color-white-text" href="https:\/\/github.com/luolongfei" target="_blank">luolongfei</a></p>';
168168

169169
echo '<script type="text/javascript">',
170170
"document.getElementById('running-box').style.display = 'none';

resources/screenshot/heroku01.png

1.9 MB
Loading

0 commit comments

Comments
 (0)