serverless-components / tencent-website

Easily deploy serverless websites (e.g. Vue.js, React, static) to Tencent Cloud with the Serverless Framework
MIT License
83 stars 15 forks source link

开启 CDN 自定义域名加速后,部署变慢 Deployment is slow after I enable Customize Domain via CDN #9

Closed tinafangkunding closed 4 years ago

tinafangkunding commented 4 years ago

问题描述 Problem Description

  1. 之前website 组件的部署很快,大概9s左右,但是开启了CDN配置后,每次再部署的时候都会做校验和配置,会变得很慢,大概180s。这样对于希望云端调试和部署的客户来说不够友好。 Website Deployment is pretty fast when we don't enable CDN configuration (about 9s ). While when we want to bind a customize domain on it, I have to re-deploy this CDN process every time I run sls --debug, the deployment time is about 180s. It's not good UX for people who want to debug/develop with the cloud environment.

当前我本地起端口来规避这个问题 Currently, I use localhost:4000 to avoid deployment frequently.

  1. 文档中缺少host的详细参数描述 Lack of host description in docs

https://github.com/serverless-components/tencent-website/blob/master/docs/configure.md#hosts-param-description

建议方案 Proposed Solutions

  1. 希望可以检测 CDN 的配置是否变动,如果完全没有更改,则跳过这部分的重新部署。 I hope the component can check if the parameters are changed, if not, we can just jump this part of CDN deployment.

  2. 建议增加参数描述 Add parameter descriptions in the following link https://github.com/serverless-components/tencent-website/blob/master/docs/configure.md#hosts-param-description

tinafangkunding commented 4 years ago

已经支持