Giter VIP home page Giter VIP logo

tencent / cloudbase-framework Goto Github PK

View Code? Open in Web Editor NEW
1.9K 40.0 191.0 6.8 MB

腾讯云开发云原生一体化部署工具 🚀 CloudBase Framework:一键部署,不限框架语言,云端一体化开发,基于Serverless 架构。A front-end and back-end integrated deployment tool. One-click deploy to serverless architecture. https://docs.cloudbase.net/framework/index

Home Page: https://cloudbase.net/framework.html

License: Other

JavaScript 97.50% Vue 1.21% Dockerfile 1.29%
serverless fullstack-javascript tencent cloudbase cli front-end mobile-development vue react dart

cloudbase-framework's People

Contributors

allcontributors[bot] avatar ansonznl avatar beetcb avatar bestony avatar binggg avatar chhpt avatar dongyuanxin avatar fanyegong avatar giantappman avatar handsomedoggy avatar liulinboyi avatar liyupi avatar lrcong avatar lt5c avatar magentaqin avatar mrjing avatar pandagis avatar qinmudi avatar ruibaby avatar shenghanqin avatar shryzhang avatar starkwang avatar stringke avatar tabspace avatar webpoin avatar woodenstone avatar wxcloudbase avatar xcatliu avatar yiliang114 avatar yuwuwu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudbase-framework's Issues

Website插件支持注入环境变量

现状

目前 website 插件无法获取到 cloudbaserc.json 里的配置(如 envId

Feature request

可以支持类似 webpack 环境变量的用法

网站部署功能优化

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

建议同时提供托管网址和自定义域名网址(如果用户使用了自定义域名)
以及在网站部署后询问是否重新部署云函数,最好是增加一个多选列表,可以全选,或者部分选择,在本地有改动的云函数名称后增加标记

Describe alternatives you've considered

Additional context

云托管部署时继承现有规格

这个功能提议是否涉及到某个问题,请详细描述
**Is your feature request related to a problem? Please describe. **

云托管部署时,如果未指定规格,会使用默认规格
但用户可能已经在控制台设置了规格,导致规格被覆盖

描述您期望的解决方案
Describe the solution you'd like

未指定配置且存在同名服务时使用现有配置

请详细描述您预期的效果
A clear and concise description of what you want to happen.

您认为可以接受的备选解决方案
Describe alternatives you've considered

降低默认值的规格

请详细描述您希望的备选解决方案。
A clear and concise description of any alternative solutions or features you've considered.

其他上下文信息
Additional context

关于这个新功能提议,您可以添加一些上下文信息或者截图信息。
Add any other context or screenshots about the feature request here.

cli命令下生成cloudbaserc.json的schema延时报错,导致部署失败

cli命令下生成cloudbaserc.json的schema延时报错,主要是schema链接不处于CDN加速状态,导致链接超时进行导致部署失败

{
  "envId": "{{envId}}",
  "$schema": "https://framework-1258016615.tcloudbaseapp.com/schema/latest.json",
  "framework": {
    "name": "egg-starter",
    "plugins": {
      "node": {
        "use": "@cloudbase/framework-plugin-node",
        "inputs": {
          "entry": "app.js",
          "name": "egg-starter",
          "path": "/egg-starter"
        }
      }
    }
  }
}

nuxt部署出错,提示页面不存在

页面提示部署成功,但是实际上页面无法访问。

// cloudbaserc.json
{
    "functionRoot": "./functions",
    "functions": [],
    "envId": "fscz-faca0",
    "framework": {
        "plugins": {
          "client": {
            "use": "@cloudbase/framework-plugin-nuxt",
            "inputs": {
                "entry": "./",
                "name": "fscz-frontend",
                "buildCommand": "npm run build",
                "outputPath": "dist"
              }
          }
        }
    }
}

image

🎉 持续征集优秀应用案例

希望各位优秀的开发者和我们一起为社区贡献更多的优秀应用和案例,帮助 CloudBase Frameowrk 社区的发展,让开发者在大家建立的丰富的社区案例和生态的基础上,更好更快地开发应用,真正达成 CloudBase Framework 希望为开发者降本增效的愿景。

如果您希望将基于 CloudBase Framework 开发的应用和案例分享给更多的开发者,欢迎提交 PR 给我们,采纳后的项目将在 CloudBase Framework 的 README 等文档的重要位置展示,并加入 CloudBase Framework 后续的官方推荐中

点击编辑 /community/usercases/index.json 文件,在数组中加入自己的项目信息

{
    "name": "项目名称",
    "link": "项目线上演示 url(如有)",
    "repo": "项目 Github url(如有)",
    "logo": "Logo url(如有, 至少 50x50,正方形)"
}

修改完毕提交会自动提交 PR,我们会在 Review 通过后定期进行进行文档的构建和生成。

再次感谢您对 CloudBase Framework 社区的贡献


欢迎大家在项目主页中加入“部署按钮”来让用户一键云端部署您的项目

例如一键部署一个在线会议应用

部署按钮生成文档参见: https://docs.cloudbase.net/framework/deploy-button.html

⭐ 攻略 一 实时大屏应用教程

3 步打造包含小程序和web云开发原生应用

https://docs.cloudbase.net/framework/guide/app.html

⭐ 攻略二 开源个人网盘应用教程

3 步把开源容器应用 Nextcloud 云开发应用

https://docs.cloudbase.net/framework/guide/container-app.html

配置选项完善

配置选项中希望增加备注配置日志采集配置,与官方控制台配置选项保持一致..

FetchError: request to https://undefined/cloudbaseenv.json failed, reason: getaddrinfo ENOTFOUND undefined

Describe the bug

静态托管未开通的情况下,如果使用了 website 插件,并且设置了环境变量,在部署时报上述的错误

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

从模板创建后,随便删几个组件,编译就失败。

Bug 描述
Describe the bug
比如汽车预约试驾,创建后编译通过。删除几个组件再撤销删除。
代码编辑器里添加

    console.log('---------> LifeCycle onPageReady')
    // const scene = decodeURIComponent(query.scene)
    // console.log(scene)
    // $page.dataset.state.testState = scene
    // this.setData({"id47": 213})
    // $page.widgets.id60.text='人员ID: ' + scene
    // $page.widgets.id60.value='1value'

本地编译就失败。

1.撤销添加的内容。恢复原始版本。也无法通过编译。

2.日志找不到,文件没有创建或者直接被删除了。

请简单清晰地描述您遇到的bug。
A clear and concise description of what the bug is.

---------------- Install npm dependencies: 10909.765ms
 CloudBase Framework  info     low-code build fail: 1
 CloudBase Framework  error     undefined
 CloudBase Framework  info     部署日志: 'C:\\Users\\wgfab\\cloudbase-framework\\logs\\Wed Jan 13 2021 21:53:43 GMT+0800 (GMT+08:00).log'

[云开发低码] 低码应用构建失败 [ appId:app-xvw, buildId:1610546020424 ]

设置代理边界条件未处理

Describe the bug

配置了 HTTPS_PROXY 而没有配置 HTTP_PROXY 变量时,CLI 无法正常访问网络

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Vue模板创建的项目web端怎那么获取uid

我使用cloudbase init --template vue 创建了项目,我用的匿名登录,我有点初级,我获取不到uid,只能获取到token。原生的HTML,js我捣鼓了能获取到uid,代码为:app.auth().hasLoginState().user.uid,哪位朋友能帮忙给一段这个vue 模板下怎么获取到uid的代码,万分感谢!

SAM 描述规范

这个功能提议是否涉及到某个问题,请详细描述
**Is your feature request related to a problem? Please describe. **

目前整理到的不规范的点:

  • 资源的描述必须写。Resources[DEMO_WEB].Properties.Description= is invalid, tip: required。
  • 环境变量的value不能为空。Resources[InitFunction].Properties.Environment.Variables[CMS_OPERATOR_PASS_WORD]= is invalid, tip: gte 1.;
  • Path 改为 HttpPath

请对您遇到问题进行清楚、简洁的描述,比如我遇到一个问题,当我...
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

描述您期望的解决方案
Describe the solution you'd like

请详细描述您预期的效果
A clear and concise description of what you want to happen.

您认为可以接受的备选解决方案
Describe alternatives you've considered

请详细描述您希望的备选解决方案。
A clear and concise description of any alternative solutions or features you've considered.

其他上下文信息
Additional context

关于这个新功能提议,您可以添加一些上下文信息或者截图信息。
Add any other context or screenshots about the feature request here.

Flutter SDK 登录认证在windows端无法使用

参考文档:
https://docs.cloudbase.net/quick-start/flutter.html#di-5-bu-chu-shi-hua-huan-jing-bing-diao-yong-ni-ming-deng-lu

代码演示:

  // 初始化
  CloudBaseCore core = CloudBaseCore.init({
    'env': 'livewallpaper-0sikk',
    // 填写您的移动应用安全来源凭证
    // 生成凭证的应用标识必须是 Android 包名或者 iOS BundleID
    'appAccess': {
      // 凭证
      'key': 'flutter',
      // 版本
      'version': 'xxxxx'
    }
  });

 // 获取登录对象
      CloudBaseAuth auth = CloudBaseAuth(core);
      CloudBaseAuthState authState = await auth.getAuthState();
      // 唤起匿名登录
      if (authState == null) {
        await auth.signInAnonymously().then((success) {
          // 登录成功
          print(success);
        }).catchError((err) {
          // 登录失败
          print(err);
        });
      }

报错:

No implementation found for method getAll on channel plugins.flutter.io/package_info

💻 Framework 自动检测功能支持更多框架

Is your feature request related to a problem? Please describe.

支持自动检测框架的覆盖范围仅仅支持了几个常见前端框架和函数,还可以拓展更多的框架和语言来提升体验

这块的实现是基于配置式的,可以比较轻松拓展一个新框架的支持
https://github.com/TencentCloudBase/cloudbase-framework/blob/master/packages/framework-core/src/detect-frameworks/frameworks.ts

大家可以通过这个快速参与进核心代码的开发当中,目前可以考虑支持的框架和技术有 Hexo, Egg, Koa, Express, Koa , Docker 容器等

  • Vue
  • React
  • VuePress
  • Nuxt
  • Function
  • Docker 容器
  • Hexo
  • Gatsbyjs
  • Next
  • Egg
  • Koa
  • Express
  • Nest
  • Hugo
  • GitBook

Describe the solution you'd like

Describe alternatives you've considered

Additional context

静态文件托管上传文件夹时会漏上传几个文件

在使用插件framework-plugin-website 时,如果上传文件夹里面文件过多,有些文件会漏上传。测试为子目录上传文件项目。

{
  "envId": "fscz-faca0",
  "$schema": "https://framework-1258016615.tcloudbaseapp.com/schema/latest.json",
  "version": "2.0",
  "functionRoot": "./functions",
  "functions": [],
  "framework": {
    "name": "fscz",
    "plugins": {
      "client": {
        "use": "@cloudbase/framework-plugin-website",
        "inputs": {
          "entry": "./client",
          "outputPath": "./client/dist"
          
        }
      }
    }
  }
}

提供通用的登录UI,降低门槛,类似于auth0

如果您也有类似的需求,可以这个 issue 下面点赞 👍

也欢迎大家在评论里面详细描述下自己的使用场景和需求
————
这个功能提议是否涉及到某个问题,请详细描述
**Is your feature request related to a problem? Please describe. **

tcb现在支持的邮箱登录,账户密码登录,微信登录已经可以满足日常需求,但是使用起来还是有门槛。
希望官方支持出一个包含UI的库,类似于auto0,自带注册,登录界面,开箱即用。

可以参考这个demo:
https://auth0.nuxtjs.org/

image
image
image

云开发日志无法保存配置

image
image
1.如图,设置保存以后日志采集路径依然为空,保存无效!!
2.希望在配置文件增加日志采集路径的配置选项.

应用本地调试功能

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

新增函数,Node 应用等应用本地调试

  • 免填写密钥
  • 本地可模拟运行

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

希望在cloudbaserc.json文件中能够增加一项云函数的配置,允许这个函数只在本地允许

这个功能提议是否涉及到某个问题,请详细描述

希望在cloudbaserc.json文件中能够增加一项云函数的配置,允许这个函数只在本地允许。我们项目会写一些操作数据库,例如初始数据,迁移数据之类的帮助用途的云函数。这些云函数我们只会在本地运行。希望能通过设置cloudbaserc.json配置这些函数哪怕在tcb fn deploy --all的时候也不会被上传到云上。

执行cloudbase framework:deploy 报文件大小超出15MB

CloudBase Framework info 📦 install plugins
CloudBase Framework info callHooks 'preDeploy'
CloudBase Framework info 🔧 init: client...
CloudBase Framework info npm install
CloudBase Framework info 🔧 init: server...
CloudBase Framework info 🔨 build: client...
CloudBase Framework info 🔨 build: server...
CloudBase Framework info 🧬 compile: client...
CloudBase Framework info 🧬 compile: server...
Error: /Users/ecool/cloudbase-framework/builds/cloudbase-function-build-1604894248252/next-ssr1604894248254.zip 文件大小超出限制 15 MB
at SamManager. (/Users/ecool/.nvm/versions/node/v10.15.1/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:200:23)
at Generator.next ()
at /Users/ecool/.nvm/versions/node/v10.15.1/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:8:71
at new Promise ()
at __awaiter (/Users/ecool/.nvm/versions/node/v10.15.1/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:4:12)
at SamManager.uploadFileViaUrlAndKey (/Users/ecool/.nvm/versions/node/v10.15.1/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:190:16)
at SamManager. (/Users/ecool/.nvm/versions/node/v10.15.1/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:173:28)
at Generator.next ()
at /Users/ecool/.nvm/versions/node/v10.15.1/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:8:71
at new Promise ()
at __awaiter (/Users/ecool/.nvm/versions/node/v10.15.1/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:4:12)
at Promise.all.filesData.map (/Users/ecool/.nvm/versions/node/v10.15.1/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:172:67)
at Array.map ()
at SamManager. (/Users/ecool/.nvm/versions/node/v10.15.1/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:172:42)
at Generator.next ()
at fulfilled (/Users/ecool/.nvm/versions/node/v10.15.1/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:5:58)
✖ /Users/ecool/cloudbase-framework/builds/cloudbase-function-build-1604894248252/next-ssr1604894248254.zip 文件大小超出限制 15 MB

rc.json配置如下
{
"$schema": "https://framework-12561loudbaseapp.com/schema/latest.json",
"framework": {
"name": "next-ssr",
"plugins": {
"client": {
"use": "@cloudbase/framework-plugin-next",
"inputs": {}
},
"server": {
"use": "@cloudbase/framework-plugin-function",
"inputs": {
"functionRootPath": "cloudfunctions",
"functions": [{
"name": "next-ssr-echo",
"timeout": 5,
"envVariables": {},
"runtime": "Nodejs10.15",
"memory": 128
}],
"servicePaths": {
"next-ssr-echo": "/next-ssr-echo"
}
}
}
}
}
}

TCBSAM 规范定义

尊敬的 cloudbase 团队您好:

首先感谢贵团队开源了代码,让我们有机会能够学习优秀的设计。我在学习 packages/framworke-core 时了解到,最终插件的部署,是通过 SamManager 生成 Sam 文件,并将 Sam 作为参数,在服务端完成最终的部署操作。

通过 default-sam.ts 文件,我们可以了解到目前 TCBSAM 语法版本为 '2020-06-15'。我们应该可以大胆地猜测,目前 cloudbase-framework 的全部云能力,都会定义在 TCBSAM 规范文档中。这份文档对插件的开发者应该具有较大的指导意义。不知道贵团队是否有开源这份规范的计划?

@binggg

希望nuxt/auth库,支持TCB provider

请对您遇到问题进行清楚、简洁的描述,比如我遇到一个问题,当我...
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

我想使用nuxt/auth集成tcb的邮箱登录,但不知道如何下手,期待有官方的demo或者provider

描述您期望的解决方案
Describe the solution you'd like

官方提供provider,支持tcb的各种登录方式。
参考auto0
https://auth.nuxtjs.org/providers/auth0

请详细描述您预期的效果
A clear and concise description of what you want to happen.

直接在nuxt/auth官网,找到tcb模块
image

您认为可以接受的备选解决方案
Describe alternatives you've considered

出一个tcb集成nuxt/auth的demo也行

docker 镜像部署失败

docker 镜像部署失败
报错如下:
at SamManager. (C:\Users\Juukee\AppData\Roaming\npm\node_modules@cloudbase\cli\node_modules@cloudbase\framework-core\lib\sam\index.js:129:31)
at Generator.next ()
at fulfilled (C:\Users\Juukee\AppData\Roaming\npm\node_modules@cloudbase\cli\node_modules@cloudbase\framework-core\lib\sam\index.js:5:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
×
部署失败,错误信息:[100003]+ docker build -f ./Dockerfile -t ccr.ccs.tencentyun.com/tcb-******-qdkp/fscz-faca0_jumpserver:jumpserver-005-1605629965 ./
Sending build context to Docker daemon 87.48MB

怎么部署到其他云环境中,如阿里云、unicloud?

这个功能提议是否涉及到某个问题,请详细描述
**Is your feature request related to a problem? Please describe. **

请对您遇到问题进行清楚、简洁的描述,比如我遇到一个问题,当我...
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

描述您期望的解决方案
Describe the solution you'd like

请详细描述您预期的效果
A clear and concise description of what you want to happen.

您认为可以接受的备选解决方案
Describe alternatives you've considered

请详细描述您希望的备选解决方案。
A clear and concise description of any alternative solutions or features you've considered.

其他上下文信息
Additional context

关于这个新功能提议,您可以添加一些上下文信息或者截图信息。
Add any other context or screenshots about the feature request here.

云应用支持https跳转设置

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

在内容分发网络中域名管理的 Https 设置里面有http跳转设置,可以完成从http强行301跳转到https的效果,但是在云接入中只有绑定域名,并没有强行跳转https的功能

Describe the solution you'd like
A clear and concise description of what you want to happen.

期望有http强行跳转到https的功能。

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

egg-starter 示例部署后无法访问

问题描述
部署后访问链接返回如下数据:
{
"requestId": "0e6d4281196d94ab9be1af0f0dde452f",
"code": "INVOKE_FUNCTION_FAILED",
"message": "user’s issue failed:kLoadFuncFailed"
}

目前发现 express、koa应用部署后可以直接访问, nest、egg部署后无法访问。

重现步骤

  1. tcb init
  2. 选择环境,选择egg框架
  3. 进入egg-starter目录
  4. 执行 tcb framework:deploy
  5. 访问云接入提供的链接

云应用版本自动构建更新

云应用每次都是手工更新版本,对于自动化集成项目来说缺少功能,希望可以通过增加检测仓库代码提交或者镜像仓库push版本

如何在本地进行调试代码?

目录结构

shutter_server
├─.env.development
├─.env.production
├─.env.staging
├─.eslintignore
├─.eslintrc
├─.gitignore
├─.prettierrc
├─README.md
├─cloudbaserc.json
├─package.json
├─yarn-error.log
├─src
|  ├─main.js  // 入口文件
|  ├─utils
|  |   └tcb.js
|  ├─routes
|  |   ├─index.js
|  |   └users.js
|  ├─models
|  |   .gitkeep
|  ├─middleware
|  |     ├─.gitkeep
|  |     └error.js
|  ├─controllers
|  |      ├─.gitkeep
|  |      └index.js

cloudbaserc配置

{
  "envId": "{{env.ENV_ID}}",
  "version": "2.0",
  "$schema": "https://framework-1258016615.tcloudbaseapp.com/schema/latest.json",
  "framework":{
    "name": "shutter_server",
    "plugins":{
      "node":{
        "use": "@cloudbase/framework-plugin-node",
        "inputs": {
          "entry": "./src/main.js",
          "name":"shutter_server",
          "path":"/shutter_server"
        }
      }
    },
    "db":{
      "use":"@cloudbase/framework-plugin-database",
      "inputs":{
        "collections":[
          {
            "collectionName": "shutter_posts",
            "description": "系统用户数据,存储用户发布的内容",
            "aclTag": "ADMINONLY"
          },
          {
            "collectionName": "shutter_users",
            "description": "系统用户数据,存储用户信息,包括管理员和运营者的账号信息,包括角色信息,用户,加密存储的密码等",
            "aclTag": "ADMINONLY"
          },
          {
            "collectionName": "shutter_albums",
            "description": "系统用户数据,存储用户发布的专辑",
            "aclTag": "ADMINONLY"
          }
        ]
      }
    }
  }
}

在vscode开启本地调试,提示找不到cloudbaserc配置文件,点击入口文件,找不到调式的菜单。

代码已发布到github上,位置shutter_server

希望能出一个一键部署laravel应用的插件或模板

我使用docker方式部署失败,而且很麻烦,希望能出一个一键部署laravel应用的功能

Dockerfile文件

FROM centos:7

RUN yum update -y && yum upgrade 
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
    rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

RUN yum install zip unzip openssl openssl-devel gcc vim git wget libxml2-devel autoconf make -y

RUN yum install -y php72w php72w-cli php72w-fpm 
# PHP 自身 / cli PHP 的命令行接口 / 用于管理 PHP 进程,并提供 FastCGI 接口与 Nginx 交互
RUN yum install -y php72w-mbstring php72w-xml php72w-bcmath && \
    yum install -y php72w-gd php72w-mysql php72w-opcache php72w-process php72w-devel

COPY . /var/www

WORKDIR /var/www
CMD ["php", "artisan", "serve", "--host=0.0.0.0" ,"--port=80"]

云托管插件副本个数/规格设置模式化

这个功能提议是否涉及到某个问题,请详细描述
**Is your feature request related to a problem? Please describe. **

开发者目前需要手动修改最小副本数为0+规格为0.25C0.5G,容易误用默认值按常驻收费,对云托管“低价”缺乏直接感受,也分不清与冷启动之间的关联。

描述您期望的解决方案
Describe the solution you'd like

  1. 版本配置中增加“副本模式”,即副本个数+规格两个字段组合配置的模板,更贴近高频场景,减少用户操作,更好引导用户降本。
  2. 一期设置两种模式:低成本,高可用,未来可能还会增加模式
  3. 仿照“上传方式”,每个服务自动记录最近一个版本(含新建版本和滚动更新)所选用的模式+副本个数+规格,在新建版本时默认继承,但用户仍可再次修改。
  4. 低成本模式,锁定最小副本数为0,规格默认值为0.25C0.5G,副本最小个数不可修改,要修改需要先切换模式。
  5. 高可用模式,最小副本数不可以为0,规格默认值为1C1G,要修改最小副本数到0需要先切换模式。
  6. 版本配置中增加“副本模式”,影响编辑副本个数。

请详细描述您预期的效果
A clear and concise description of what you want to happen.

您认为可以接受的备选解决方案
Describe alternatives you've considered

请详细描述您希望的备选解决方案。
A clear and concise description of any alternative solutions or features you've considered.

其他上下文信息
Additional context

关于这个新功能提议,您可以添加一些上下文信息或者截图信息。
Add any other context or screenshots about the feature request here.

framework-plugin-container 参数冲突或者优先级顺序问题

{
  "envId": "{{envId}}",
  "framework": {
    "name": "capp-example",
    "plugins": {
      "client": {
        "use": "@cloudbase/framework-plugin-container",
        "inputs": {
          "serviceName": "node-api",
          "servicePath": "/node-api",
          "localPath": "./",
          "uploadType": "image",
          "imageInfo": {
            "imageUrl": "ccr.ccs.tencentyun.com/tcb-100010952056-rjdt/webpage_node-api:node-api-001-1597238358"
          }
        }
      }
    }
  }
}

localPath 不能同时和镜像地址同时配置,否则部署超时报错。

如果因为网络等原因部署失败一次,后面就会报:a version is building, please wait for end

Bug 描述
Describe the bug

网络原因(机场不稳定)部署失败,后面再部署,会提示a version is building, please wait for end

重现步骤
To Reproduce

重现 bug 的步骤:

  1. 执行 yarn deploy:server
  2. 失败后再次执行yarn deploy:server
  3. 提示a version is building, please wait for end

预期的行为
Expected behavior
前后多次部署行为不会互相影响

截图
Screenshots
如果方便的话,可以提交截图来帮助我们分析您遇到的问题
If applicable, add screenshots to help explain your problem.

错误日志
Debug LOG

[CreateAndDeployCloudBaseProject]
RequestId:***************************
a version is building, please wait for end.
error Command failed with exit code 1.

其他上下文信息
Additional context

Add any other context about the problem here.

云应用插件错误提示不理想 framework-plugin-container

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

在部署nginx服务器时,nginx.conf的注释方式写错了,正确的为#,但我误写成 // 啦,在部署过程中并没有提醒。后来不得不在本地安装了docker,尝试 docker run 时才发现了问题。

server { 
        listen *:80; 
        listen [::]:80; 
        server_name tcb.xiaoxili.com;  // 这里是问题的注释方式     
        location / { 
                 proxy_pass http://static.xiaoxili.com/; 
        } 
} 
正在部署[░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░        ] 80% 600.2 sError: 部署失败,错误信息:[100001]deploy_fail, 请求RequestId:5d28f7fd-b600-4ac0-9466-8e482a71d4ee 
    at SamManager.<anonymous> (/Users/hanqin/.nvm/versions/node/v12.16.2/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:93:35) 
    at Generator.next (<anonymous>) 
    at fulfilled (/Users/hanqin/.nvm/versions/node/v12.16.2/lib/node_modules/@cloudbase/cli/node_modules/@cloudbase/framework-core/lib/sam/index.js:5:58) 
    at runMicrotasks (<anonymous>) 
    at processTicksAndRejections (internal/process/task_queues.js:97:5) 
✖ 部署失败,错误信息:[100001]deploy_fail, 请求RequestId:5d28f7fd-b600-4ac0-9466-8e482a71d4ee 

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

网站插件支持 cloudbaseenv.js 来获取当前环境下的变量

这个功能提议是否涉及到某个问题,请详细描述
**Is your feature request related to a problem? Please describe. **

目前网站插件会把变量注入到 /cloudbaseenv.json 中,获取比较麻烦,需要发起异步请求

描述您期望的解决方案
Describe the solution you'd like

变量双写 cloudbaseenv.js,获取时直接从全局变量中读取,cloudbaseenv.json 继续保留下来用于保存数据。

其他上下文信息
Additional context

关于这个新功能提议,您可以添加一些上下文信息或者截图信息。
Add any other context or screenshots about the feature request here.

希望cli提供更多提示,如腾讯云账户、云环境Id、执行的命令

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
当前提示,感觉很容易上传错误吧?
cloudbase cli 提示环境id

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

支持切换后台服务地址

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

支持自定义底层后台服务地址,地域等

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.