Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
luolongfei committed Dec 14, 2021
1 parent 345a285 commit b6b2232
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,21 +471,28 @@ systemctl restart docker
#### 2、创建腾讯云函数

直接访问腾讯云函数控制台创建云函数: [https://console.cloud.tencent.com/scf/list-create?rid=5&ns=default&createType=empty](https://console.cloud.tencent.com/scf/list-create?rid=5&ns=default&createType=empty)
,按照下图所示的说明进行创建。如果无法看清图片,可访问: [https://github.com/luolongfei/freenom/blob/main/resources/screenshot/scf.png](https://github.com/luolongfei/freenom/blob/main/resources/screenshot/scf.png)
或者 [https://z3.ax1x.com/2021/10/14/5lMweU.png](https://z3.ax1x.com/2021/10/14/5lMweU.png) 查看原图,也可以直接点击图片查看原图。
,按照下图所示的说明进行创建。如果无法看清图片,直接点击图片即可查看原图。

[![scf01](https://z3.ax1x.com/2021/10/14/5lMweU.png)](https://z3.ax1x.com/2021/10/14/5lMweU.png)

按照上图所示部署完成后,可以点击云函数的名称进入云函数管理画面,管理画面点击函数代码,然后往下翻可看到`部署``测试`按钮,点击`测试`,稍等几秒钟,即可看到输出日志, 根据输出日志判断配置以及部署是否正确。

[![scf02](https://z3.ax1x.com/2021/10/14/5l3oHf.png)](https://z3.ax1x.com/2021/10/14/5l3oHf.png)

> 如何在腾讯云函数修改或者新增环境变量呢?
>
如果你在创建腾讯云函数的时候,某些环境变量忘记填了,或者在创建腾讯云函数后想要修改或者新增某些环境变量,可以参考这里操作,无需重建:

[![scf03](https://z3.ax1x.com/2021/11/07/I13Ku8.png)](https://z3.ax1x.com/2021/11/07/I13Ku8.png)

所有受支持的环境变量及其含义请参考 [.env.example](https://github.com/luolongfei/freenom/blob/main/.env.example) 文件。

> 如何在腾讯云函数更新部署的代码呢?
>
当有新版本可用时,想升级到最新版本,请按下图所示操作。更新代码包并部署后,可以点击测试查看部署是否成功。在更新完代码后,腾讯云函数编辑器里面可能会提示你同步代码,点击确定即可。

[![scf04.png](https://s4.ax1x.com/2021/12/14/ovruHf.png)](https://s4.ax1x.com/2021/12/14/ovruHf.png)

*有关腾讯云函数部署的内容结束。*

***
Expand Down Expand Up @@ -516,7 +523,8 @@ systemctl restart docker

##### 3.1 创建服务

此处我没有勾选【日志功能】,如果你需要【日志功能】请勾选后根据官方引导开启,否则跟下图配置一致即可。
直接访问 [https://fcnext.console.aliyun.com/cn-hongkong/services](https://fcnext.console.aliyun.com/cn-hongkong/services)
,然后点击【创建服务】,地点推荐选择【香港】。此处我没有勾选【日志功能】,如果你需要【日志功能】请勾选后根据官方引导开启,否则跟下图配置一致即可。

[![aliyun01.png](https://s4.ax1x.com/2021/12/14/ovPFKg.png)](https://s4.ax1x.com/2021/12/14/ovPFKg.png)

Expand Down
2 changes: 1 addition & 1 deletion app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function system_check()
// 如果是在云函数部署,则不需要检查这几项
if (IS_SCF) {
system_log('检测到运行环境为云函数,所有环境变量将直接从环境中读取,环境中找不到的变量,则直接从 .env.example 文件中读取');
system_log('如果是在腾讯云函数,可以参考此处修改或新增环境变量,无需重建:https://github.com/luolongfei/freenom/blob/main/resources/screenshot/scf_env_modify.png');
system_log('如果是在腾讯云函数,可以参考此处修改或新增环境变量,无需重建:https://github.com/luolongfei/freenom/blob/main/resources/screenshot/scf03.png');
system_log('如果是在阿里云函数,可以直接在【函数详情】->【函数配置】->【环境信息】处编辑环境变量');
} else {
if (!function_exists('putenv')) {
Expand Down
File renamed without changes
Binary file added resources/screenshot/scf02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added resources/screenshot/scf04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b6b2232

Please sign in to comment.