Skip to content

Commit

Permalink
update help
Browse files Browse the repository at this point in the history
  • Loading branch information
anycodes committed Dec 10, 2021
1 parent 880d51b commit 263507b
Show file tree
Hide file tree
Showing 118 changed files with 1,858 additions and 1,192 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
async function preInit(inputObj) {

}

async function postInit(inputObj) {
console.log(`\n ____ _ _ ___ _ _ _ _____ ____
/ _ \\/ \\ / \\\\ \\/// \\ /\\/ \\ /| / // _\\
| / \\|| | | | \\ / | | ||| |\\ || | __\\| /
| |-||| |_/\\| | / / | \\_/|| | \\|| | | | \\__
\\_/ \\|\\____/\\_//_/ \\____/\\_/ \\| \\_/ \\____/
`)
\\_/ \\|\\____/\\_//_/ \\____/\\_/ \\| \\_/ \\____/`)
}

async function postInit(inputObj) {
console.log(`\n Welcome to the Aliyun FC start application
This application requires to open these services:
FC : https://fc.console.aliyun.com/
This application can help you quickly deploy the aliyun fc project.
The application uses FC component:
* Help Docs : https://github.com/devsapp/fc
* Yaml Config: https://github.com/devsapp/fc/blob/main/docs/zh/yaml.md
The application homepage: https://github.com/devsapp/start-fc\n`)
ACR: https://cr.console.aliyun.com/
* 额外说明:s.yaml中声明了actions:
部署前执行:s build --use-docker --dockerfile ./code/Dockerfile
如果不需要每次都构建项目,或者部署前不需要构建,或者已经手动构建了,可以注释掉这部分内容
> PS:部署的时候还需要修改s.yaml中image字段为自己的acr配置的地址
* 项目初始化完成,您可以直接进入项目目录下,并使用 s deploy 进行项目部署
\n`)
}

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Application
Name: start-fc-custom-container-event-cpp
Provider:
- 阿里云
Version: 1.1.4
Version: 1.1.7
Description: 快速部署一个基于custom container runtime 的C++ Event 类型的 Hello World 到阿里云函数计算
HomePage: https://github.com/devsapp/start-fc
Tags:
Expand Down
45 changes: 33 additions & 12 deletions custom-container-function/fc-custom-container-event-cpp/src/s.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,59 @@
# ------------------------------------
# 欢迎您使用阿里云函数计算 FC 组件进行项目开发
# 组件仓库地址/帮助文档:https://github.com/devsapp/fc
# Yaml参考文档:https://github.com/devsapp/fc/blob/main/docs/zh/yaml.md
# 快速入门:
# 快速创建应用:https://github.com/devsapp/fc/blob/main/docs/zh/quick_start_application.md
# 快速使用命令:https://github.com/devsapp/fc/blob/main/docs/zh/quick_start_function.md
# Yaml参考文档:https://github.com/devsapp/fc/blob/jiangyu-docs/docs/zh/yaml.md
# 关于:
# - Serverless Devs和FC组件的关系、如何声明/部署多个函数、超过50M的代码包如何部署
# - 关于.fcignore使用方法、工具中.s目录是做什么、函数进行build操作之后如何处理build的产物
# 等问题,可以参考文档:https://github.com/devsapp/fc/blob/jiangyu-docs/docs/zh/tips.md
# 关于如何做CICD等问题,可以参考:https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/cicd.md
# 有问题快来钉钉群问一下吧:33947367
# ------------------------------------

edition: 1.0.0
name: helloworldApp
name: hello-world-app
access: "{{ access }}"
vars:

vars: # 全局变量
region: cn-hangzhou
service:
name: hello-world-service
description: 'hello world by serverless devs'

services:
helloworld:
component: fc
helloworld: # 业务名称/模块名称
actions: # 自定义执行逻辑
pre-deploy: # 在deploy之前运行
- run: s build --use-docker --dockerfile ./code/Dockerfile # 要运行的命令行
path: ./ # 命令行运行的路径
# post-deploy: # 在deploy之后运行
# - run: s versions # 要运行的命令行
# path: ./ # 命令行运行的路径
props:
region: ${vars.region}
service:
name: hello-world-service
service: ${vars.service}
function:
name: cpp-event-function
description: 'hello world by serverless devs'
caPort: 9000
memorySize: 256
handler: not-used
timeout: 60
initializationTimeout: 30
initializer: not-used
runtime: custom-container
customContainerConfig:
image: registry.cn-hangzhou.aliyuncs.com/fc-demo/fc-springboot-http:v0.1 # 需要换成自己的registry地址
codeUri: ./code
# next-function: # 第二个函数的案例,仅供参考
# # 如果在当前项目下执行 s deploy,会同时部署模块:
# # helloworld:服务hello-world-service,函数cpp-event-function
# # next-function:服务hello-world-service,函数next-function-example
# # 如果想单独部署当前服务与函数,可以执行 s + 模块名/业务名 + deploy,例如:s next-function deploy
# # 如果想单独部署当前函数,可以执行 s + 模块名/业务名 + deploy function,例如:s next-function deploy function
# # 更多命令可参考:https://github.com/devsapp/fc/tree/jiangyu-docs/docs#文档相关
# component: fc
# props:
# region: ${vars.region}
# service: ${vars.service} # 应用整体的服务配置
# function: # 定义一个新的函数
# name: next-function-example
# description: 'hello world by serverless devs'
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
async function preInit(inputObj) {

}

async function postInit(inputObj) {
console.log(`\n ____ _ _ ___ _ _ _ _____ ____
/ _ \\/ \\ / \\\\ \\/// \\ /\\/ \\ /| / // _\\
| / \\|| | | | \\ / | | ||| |\\ || | __\\| /
| |-||| |_/\\| | / / | \\_/|| | \\|| | | | \\__
\\_/ \\|\\____/\\_//_/ \\____/\\_/ \\| \\_/ \\____/
`)
\\_/ \\|\\____/\\_//_/ \\____/\\_/ \\| \\_/ \\____/`)
}

async function postInit(inputObj) {
console.log(`\n Welcome to the Aliyun FC start application
This application requires to open these services:
FC : https://fc.console.aliyun.com/
This application can help you quickly deploy the aliyun fc project.
The application uses FC component:
* Help Docs : https://github.com/devsapp/fc
* Yaml Config: https://github.com/devsapp/fc/blob/main/docs/zh/yaml.md
The application homepage: https://github.com/devsapp/start-fc\n`)
ACR: https://cr.console.aliyun.com/
* 额外说明:s.yaml中声明了actions:
部署前执行:s build --use-docker --dockerfile ./code/Dockerfile
如果不需要每次都构建项目,或者部署前不需要构建,或者已经手动构建了,可以注释掉这部分内容
> PS:部署的时候还需要修改s.yaml中image字段为自己的acr配置的地址
* 项目初始化完成,您可以直接进入项目目录下,并使用 s deploy 进行项目部署
\n`)
}

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Application
Name: start-fc-custom-container-event-nodejs14
Provider:
- 阿里云
Version: 1.1.4
Version: 1.1.7
Description: 快速部署一个基于custom container runtime 的 nodejs14 Event 类型的 Hello World 到阿里云函数计算
HomePage: https://github.com/devsapp/start-fc
Tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,60 @@
# ------------------------------------
# 欢迎您使用阿里云函数计算 FC 组件进行项目开发
# 组件仓库地址/帮助文档:https://github.com/devsapp/fc
# Yaml参考文档:https://github.com/devsapp/fc/blob/main/docs/zh/yaml.md
# 快速入门:
# 快速创建应用:https://github.com/devsapp/fc/blob/main/docs/zh/quick_start_application.md
# 快速使用命令:https://github.com/devsapp/fc/blob/main/docs/zh/quick_start_function.md
# Yaml参考文档:https://github.com/devsapp/fc/blob/jiangyu-docs/docs/zh/yaml.md
# 关于:
# - Serverless Devs和FC组件的关系、如何声明/部署多个函数、超过50M的代码包如何部署
# - 关于.fcignore使用方法、工具中.s目录是做什么、函数进行build操作之后如何处理build的产物
# 等问题,可以参考文档:https://github.com/devsapp/fc/blob/jiangyu-docs/docs/zh/tips.md
# 关于如何做CICD等问题,可以参考:https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/cicd.md
# 有问题快来钉钉群问一下吧:33947367
# ------------------------------------

edition: 1.0.0
name: helloworldApp
name: hello-world-app
access: "{{ access }}"
vars:

vars: # 全局变量
region: cn-hangzhou
service:
name: hello-world-service
description: 'hello world by serverless devs'

services:
helloworld:
helloworld: # 业务名称/模块名称
component: fc
actions: # 自定义执行逻辑
pre-deploy: # 在deploy之前运行
- run: s build --use-docker --dockerfile ./code/Dockerfile # 要运行的命令行
path: ./ # 命令行运行的路径
# post-deploy: # 在deploy之后运行
# - run: s versions # 要运行的命令行
# path: ./ # 命令行运行的路径
props:
region: ${vars.region}
service:
name: hello-world-service
service: ${vars.service}
function:
name: nodejs14-event-function
description: 'hello world by serverless devs'
caPort: 9000
memorySize: 256
handler: not-used
timeout: 60
initializationTimeout: 30
initializer: not-used
runtime: custom-container
customContainerConfig:
image: registry.cn-hangzhou.aliyuncs.com/fc-demo/fc-springboot-http:v0.1 # 需要换成自己的registry地址
codeUri: ./code
# next-function: # 第二个函数的案例,仅供参考
# # 如果在当前项目下执行 s deploy,会同时部署模块:
# # helloworld:服务hello-world-service,函数cpp-event-function
# # next-function:服务hello-world-service,函数next-function-example
# # 如果想单独部署当前服务与函数,可以执行 s + 模块名/业务名 + deploy,例如:s next-function deploy
# # 如果想单独部署当前函数,可以执行 s + 模块名/业务名 + deploy function,例如:s next-function deploy function
# # 更多命令可参考:https://github.com/devsapp/fc/tree/jiangyu-docs/docs#文档相关
# component: fc
# props:
# region: ${vars.region}
# service: ${vars.service} # 应用整体的服务配置
# function: # 定义一个新的函数
# name: next-function-example
# description: 'hello world by serverless devs'
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
async function preInit(inputObj) {

}

async function postInit(inputObj) {
console.log(`\n ____ _ _ ___ _ _ _ _____ ____
/ _ \\/ \\ / \\\\ \\/// \\ /\\/ \\ /| / // _\\
| / \\|| | | | \\ / | | ||| |\\ || | __\\| /
| |-||| |_/\\| | / / | \\_/|| | \\|| | | | \\__
\\_/ \\|\\____/\\_//_/ \\____/\\_/ \\| \\_/ \\____/
`)
\\_/ \\|\\____/\\_//_/ \\____/\\_/ \\| \\_/ \\____/`)
}

async function postInit(inputObj) {
console.log(`\n Welcome to the Aliyun FC start application
This application requires to open these services:
FC : https://fc.console.aliyun.com/
This application can help you quickly deploy the aliyun fc project.
The application uses FC component:
* Help Docs : https://github.com/devsapp/fc
* Yaml Config: https://github.com/devsapp/fc/blob/main/docs/zh/yaml.md
The application homepage: https://github.com/devsapp/start-fc\n`)
ACR: https://cr.console.aliyun.com/
* 额外说明:s.yaml中声明了actions:
部署前执行:s build --use-docker --dockerfile ./code/Dockerfile
如果不需要每次都构建项目,或者部署前不需要构建,或者已经手动构建了,可以注释掉这部分内容
> PS:部署的时候还需要修改s.yaml中image字段为自己的acr配置的地址
* 项目初始化完成,您可以直接进入项目目录下,并使用 s deploy 进行项目部署
\n`)
}

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Application
Name: start-fc-custom-container-event-python3.9
Provider:
- 阿里云
Version: 1.1.4
Version: 1.1.7
Description: 快速部署一个基于custom container runtime 的 python3.9 Event 类型的 Hello World 到阿里云函数计算
HomePage: https://github.com/devsapp/start-fc
Tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
# ------------------------------------
# 欢迎您使用阿里云函数计算 FC 组件进行项目开发
# 组件仓库地址/帮助文档:https://github.com/devsapp/fc
# Yaml参考文档:https://github.com/devsapp/fc/blob/main/docs/zh/yaml.md
# Yaml参考文档:https://github.com/devsapp/fc/blob/jiangyu-docs/docs/zh/yaml.md
# 关于:
# - Serverless Devs和FC组件的关系、如何声明/部署多个函数、超过50M的代码包如何部署
# - 关于.fcignore使用方法、工具中.s目录是做什么、函数进行build操作之后如何处理build的产物
# 等问题,可以参考文档:https://github.com/devsapp/fc/blob/jiangyu-docs/docs/zh/tips.md
# 关于如何做CICD等问题,可以参考:https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/cicd.md
# 有问题快来钉钉群问一下吧:33947367
# ------------------------------------

edition: 1.0.0
name: chelloworldApp
name: hello-world-app
access: "{{ access }}"
vars:

vars: # 全局变量
region: cn-hangzhou
service:
name: hello-world-service
description: 'hello world by serverless devs'

services:
helloworld:
helloworld: # 业务名称/模块名称
component: fc
actions: # 自定义执行逻辑
pre-deploy: # 在deploy之前运行
- run: s build --use-docker --dockerfile ./code/Dockerfile # 要运行的命令行
path: ./ # 命令行运行的路径
# post-deploy: # 在deploy之后运行
# - run: s versions # 要运行的命令行
# path: ./ # 命令行运行的路径
props:
region: ${vars.region}
service:
name: hello-world-service
service: ${vars.service}
function:
name: py39-event-function
description: 'hello world by serverless devs'
handler: not-used
timeout: 60
caPort: 9000
memorySize: 256
Expand All @@ -33,3 +44,17 @@ services:
customContainerConfig:
image: registry.cn-hangzhou.aliyuncs.com/fc-demo/fc-springboot-http:v0.1 # 需要换成自己的registry地址
codeUri: ./code
# next-function: # 第二个函数的案例,仅供参考
# # 如果在当前项目下执行 s deploy,会同时部署模块:
# # helloworld:服务hello-world-service,函数cpp-event-function
# # next-function:服务hello-world-service,函数next-function-example
# # 如果想单独部署当前服务与函数,可以执行 s + 模块名/业务名 + deploy,例如:s next-function deploy
# # 如果想单独部署当前函数,可以执行 s + 模块名/业务名 + deploy function,例如:s next-function deploy function
# # 更多命令可参考:https://github.com/devsapp/fc/tree/jiangyu-docs/docs#文档相关
# component: fc
# props:
# region: ${vars.region}
# service: ${vars.service} # 应用整体的服务配置
# function: # 定义一个新的函数
# name: next-function-example
# description: 'hello world by serverless devs'
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
async function preInit(inputObj) {

}

async function postInit(inputObj) {
console.log(`\n ____ _ _ ___ _ _ _ _____ ____
/ _ \\/ \\ / \\\\ \\/// \\ /\\/ \\ /| / // _\\
| / \\|| | | | \\ / | | ||| |\\ || | __\\| /
| |-||| |_/\\| | / / | \\_/|| | \\|| | | | \\__
\\_/ \\|\\____/\\_//_/ \\____/\\_/ \\| \\_/ \\____/
`)
\\_/ \\|\\____/\\_//_/ \\____/\\_/ \\| \\_/ \\____/`)
}

async function postInit(inputObj) {
console.log(`\n Welcome to the Aliyun FC start application
This application requires to open these services:
FC : https://fc.console.aliyun.com/
This application can help you quickly deploy the aliyun fc project.
The application uses FC component:
* Help Docs : https://github.com/devsapp/fc
* Yaml Config: https://github.com/devsapp/fc/blob/main/docs/zh/yaml.md
The application homepage: https://github.com/devsapp/start-fc\n`)
ACR: https://cr.console.aliyun.com/
* 额外说明:s.yaml中声明了actions:
部署前执行:s build --use-docker --dockerfile ./code/Dockerfile
如果不需要每次都构建项目,或者部署前不需要构建,或者已经手动构建了,可以注释掉这部分内容
> PS:部署的时候还需要修改s.yaml中image字段为自己的acr配置的地址
* 项目初始化完成,您可以直接进入项目目录下,并使用 s deploy 进行项目部署
\n`)
}

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Application
Name: start-fc-custom-container-http-aspdotnetcore
Provider:
- 阿里云
Version: 1.1.5
Version: 1.1.7
Description: 快速部署一个基于custom container runtime 的 asp .netcore HTTP 类型的 Hello World 到阿里云函数计算
HomePage: https://github.com/devsapp/start-fc
Tags:
Expand Down
Loading

0 comments on commit 263507b

Please sign in to comment.