Skip to content

Commit

Permalink
更新 Heroku 相关文件
Browse files Browse the repository at this point in the history
  • Loading branch information
luolongfei committed May 27, 2022
1 parent 249d080 commit 8cb3044
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 46 deletions.
94 changes: 53 additions & 41 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,53 @@
{
"name": "freenom",
"description": "Deploy freenom scripts to heroku.",
"keywords": [
"freenom",
"auto-renewal"
],
"env": {
"FREENOM_USERNAME": {
"description": "Freenom 账户 Freenom Account",
"value": ""
},
"FREENOM_PASSWORD": {
"description": "Freenom 密码 Freenom password",
"value": ""
},
"MULTIPLE_ACCOUNTS": {
"description": "多账户支持 Support for multiple accounts",
"value": "",
"required": false
},
"TELEGRAM_CHAT_ID": {
"description": "你的 chat_id,通过发送“/start”给 @userinfobot 可以获取自己的 id Your chat_id, you can get your own id by sending \"/start\" to @userinfobot",
"value": "",
"required": false
},
"TELEGRAM_BOT_TOKEN": {
"description": "你的 Telegram bot 的 token Token for your Telegram bot",
"value": "",
"required": false
},
"TELEGRAM_BOT_ENABLE": {
"description": "是否启用 Telegram Bot 功能 1:启用 0:不启用 Whether to enable Telegram Bot features 1: enabled 0: not enabled",
"value": "1",
"required": false
}
},
"website": "llfapp.com",
"repository": "https://github.com/luolongfei/freenom",
"stack": "container"
}
{
"name": "freenom auto-renewal",
"description": "Deploy freenom scripts to heroku.",
"keywords": [
"freenom",
"auto-renewal",
"heroku",
"luolongfei"
],
"env": {
"A_TIP": {
"description": "这是一个提醒:此处我只列举了常见的几个环境变量的配置,更多的环境变量,请参考 .env.example 文件的内容,.env.example 文件的地址见输入框。你可以待容器部署完成后,在 settings -> Config Vars 点击 Reveal Config Vars 按钮配置更多的环境变量。由于自作聪明的 Heroku 将下面的变量顺序按字母正序,看起来可能有点混乱。This is a reminder: I have only listed the configuration of a few common environment variables here, for more environment variables, please refer to the contents of the .env.example file, see the input box for the address of the .env.example file. You can configure more environment variables after the container has been deployed by clicking the Reveal Config Vars button in settings -> Config Vars. Since the clever Heroku puts the variables below in alphabetical order, it may look a bit confusing.",
"value": "https://github.com/luolongfei/freenom/blob/main/.env.example",
"required": false
},
"FREENOM_USERNAME": {
"description": "Freenom 账户 Freenom Account",
"value": ""
},
"FREENOM_PASSWORD": {
"description": "Freenom 密码 Freenom password",
"value": ""
},
"MULTIPLE_ACCOUNTS": {
"description": "多账户支持 Support for multiple accounts",
"value": "",
"required": false
},
"TELEGRAM_CHAT_ID": {
"description": "你的 chat_id,通过发送“/start”给 @userinfobot 可以获取自己的 id Your chat_id, you can get your own id by sending \"/start\" to @userinfobot",
"value": "",
"required": false
},
"TELEGRAM_BOT_TOKEN": {
"description": "你的 Telegram bot 的 token Token for your Telegram bot",
"value": "",
"required": false
},
"TELEGRAM_BOT_ENABLE": {
"description": "是否启用 Telegram Bot 功能 1:启用 0:不启用 Whether to enable Telegram Bot features 1: enabled 0: not enabled",
"value": "1",
"required": false
},
"SHOW_SERVER_INFO": {
"description": "送信时是否显示服务器信息 1:显示 0:不显示 Whether to display server information when sending messages 1: Display 0: Do not display",
"value": "1",
"required": false
}
},
"website": "llfapp.com",
"repository": "https://github.com/luolongfei/freenom",
"stack": "container"
}
2 changes: 1 addition & 1 deletion app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function system_check()
throw new LlfException(34520006, ['7.3', PHP_VERSION]);
}

// 如果是在云函数部署,则不需要检查这几项
// 如果是在 云函数 或 Heroku 部署,则不需要检查这几项
if (IS_SCF || (int)env('IS_HEROKU') === 1) {
system_log(lang('100009'));
system_log(lang('100010'));
Expand Down
6 changes: 3 additions & 3 deletions heroku.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build:
docker:
web: Dockerfile.heroku
build:
docker:
web: Dockerfile.heroku
2 changes: 1 addition & 1 deletion resources/lang/zh.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
'100006' => '执行出错:<red>%s</red>',
'100007' => '云函数执行成功。',
'100008' => '云函数执行失败。',
'100009' => '检测到运行环境为云函数,所有环境变量将直接从环境中读取,环境中找不到的变量,则直接从 .env.example 文件中读取',
'100009' => '检测到运行环境为 云函数 或 Heroku,所有环境变量将直接从环境中读取,环境中找不到的变量,则直接从 .env.example 文件中读取',
'100010' => '如果是在腾讯云函数,可以参考此处修改或新增环境变量,无需重建:https://github.com/luolongfei/freenom/blob/main/resources/screenshot/scf03.png',
'100011' => '如果是在阿里云函数,可以直接在【函数详情】->【函数配置】->【环境信息】处编辑环境变量',
'100012' => '由于你没有开启升级提醒功能,故无法在有新版本可用时第一时间收到通知。将 .env 文件中 NEW_VERSION_DETECTION 的值改为 1 即可重新开启相关功能。',
Expand Down

0 comments on commit 8cb3044

Please sign in to comment.