Skip to content

Commit 37282ed

Browse files
authored
Merge pull request #3 from serverless-tencent/local
Local
2 parents 1a5ee15 + 27a9a07 commit 37282ed

File tree

13 files changed

+122
-22
lines changed

13 files changed

+122
-22
lines changed

.DS_Store

6 KB
Binary file not shown.

Advanced/Customdomain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ $ sls deploy
7878

7979
component: apigateway # (必填) 组件名称,此处为 apigateway
8080
name: restApi # (必填) 实例名称
81-
org: orgDemo # (可选) 用于记录组织信息,默认值为您的腾讯云账户 appid
81+
8282
app: appDemo # (可选) 该应用名称
8383
stage: dev # (可选) 用于区分环境信息,默认值为 dev
8484

Advanced/Static.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ export default {
106106
3.`serverless.yml` 中`,新增静态资源相关配置 staticConf,如下:
107107

108108
```
109-
org: orgDemo
110109
app: appDemo
111110
stage: dev
112111
component: nextjs

Advanced/Template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ egg 组件的 yml 文件示例如下,全量配置文件可参考 [Eggjs 组件
5454
```yml
5555
# serverless.yml
5656
app: app-demo #应用名称,同一个应用下每个组件的 app,stage,org 参数必须保持一一致
57-
org: app-demo
5857
stage: dev
5958
component: egg
6059
name: app-demo-egg # (必填) 创建的实例名称

Best-practice/HexoBlog.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ $ touch serverless.yml
6969

7070
component: website # (必填) 引用 component 的名称,当前用到的是 tencent-website 组件
7171
name: hexodemo # (必填) 该 website 组件创建的实例名称
72-
org: test # (可选) 用于记录组织信息,默认值为您的腾讯云账号 APPID
7372
app: websiteApp # (可选) 该 website 应用名称
7473
stage: dev # (可选) 用于区分环境信息,默认值是 dev
7574

Best-practice/REST-API.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ serverless create --template-url https://github.com/serverless/components/tree/v
3838

3939
component: scf
4040
name: apidemo
41-
org: test
4241
app: scfApp
4342
stage: dev
4443

Best-practice/Website.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ $ serverless deploy
7676

7777
component: website # (必填) 引用 component 的名称,当前用到的是 tencent-website 组件
7878
name: websitedemo # (必填) 该 website 组件创建的实例名称
79-
org: test # (可选) 用于记录组织信息,默认值为您的腾讯云账户 appid
8079
app: websiteApp # (可选) 该 website 应用名称
8180
stage: dev # (可选) 用于区分环境信息,默认值是 dev
8281

SCF-development/Create.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,13 @@ Serverless Framework 提供了多个基础资源组件,用户可以通过不
8989

9090
示例 yml:
9191
```yml
92-
org: xxx
9392
app: demo
9493
component: scf
9594
name: rest-api
9695
stage: dev
9796
9897
inputs:
99-
name: ${org}-${stage}-${app}-${name} # 命名最终为 "acme-prod-ecommerce-rest-api"
98+
name: ${stage}-${app}-${name} # 命名最终为 "dev-demo-rest-api"
10099
region: ${env:REGION} # 环境变量中指定的 REGION= 信息
101100
vpcName: ${output:prod:my-app:vpc.name} # 获取其他组件中的输出信息
102101
vpcName: ${output:${stage}:${app}:vpc.name} # 上述方式也可以组合使用

SCF-development/Yml.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Serverless Framework 通过项目配置文件 `serverless.yml` 完成应用的
1212

1313
```yml
1414
#应用组织信息(可选)
15-
org: '' # 组织名称。留空则则使用默认值为用户appid
1615
app: '' # 应用名称。留空则默认取当前组件的实例名称为app名称。
1716
stage: '' # 环境名称。默认值是 dev。建议使用${env.STAGE}变量定义环境名称
1817

Transfer/Django.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,14 @@ layout: Doc
1616
1717
## 操作步骤
1818

19-
### 1. (可选)初始化 Django 模版项目
20-
如果您本地并没有 Django 项目,可通过以下指令完成 Django 项目初始化(本地已有项目可跳过该步骤)
21-
```
22-
serverless init django-starter --name example
23-
cd example
24-
```
2519

26-
### 2. 安装项目依赖
27-
如果您自己创建项目,请将 Python 所需要的依赖安装到项目目录,例如本实例需要Django,所以可以通过pip进行安装:
20+
### 1. 安装项目依赖
21+
您自己创建项目,将 Python 所需要的依赖安装到项目目录,例如本实例需要Django,所以可以通过pip进行安装:
2822
```
2923
pip install Django -t ./
3024
```
3125

32-
### 3. 配置 yml 文件
26+
### 2. 配置 yml 文件
3327
在项目根目录下,新建 `serverless.yml` 文件,并将下列配置模版粘贴到文件中,实现基本的项目配置。
3428
>基于您实际部署需要,您可以在 `serverless.yml` 中完成更多配置,yml 文件的配置信息请参考[ Django 组件全量配置](https://github.com/serverless-components/tencent-django/blob/master/docs/configure.md)
3529
@@ -41,7 +35,7 @@ touch serverless.yml
4135
#serverless.yml
4236
component: django
4337
name: djangoDemo
44-
org: orgDemo
38+
4539
app: appDemo
4640
stage: dev
4741

@@ -62,7 +56,7 @@ inputs:
6256
```
6357
6458
65-
### 4. 应用部署
59+
### 3. 应用部署
6660
通过 `sls deploy` 命令进行部署,并可以添加 --debug 参数查看部署过程中的信息。
6761

6862
```

0 commit comments

Comments
 (0)