前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >后端云站从虚拟机迁移到serverless

后端云站从虚拟机迁移到serverless

作者头像
后端云
发布2021-02-05 14:41:16
6100
发布2021-02-05 14:41:16
举报
文章被收录于专栏:后端云

后端云站经历了几个阶段:放在github+CNAME,遇到不稳定,速度慢;后放到阿里云的云主机,很流畅稳定,唯一的缺点就是收费;现在腾讯云,阿里云都推出了无服务器服务serverless,这种博客的访问量完全在免费范围内,测试了下,完全没问题,放了一个拷贝放到了腾讯云上。链接:http://my-bucket-hexo-1257857641.cos-website.ap-guangzhou.myqcloud.com

可以考虑以后退掉云主机,改用serverless了。

代码语言:javascript
复制
hanwei@hanweideMacBook-Air backendcloud-3-hexo % sls --debug
  DEBUG ─ Resolving the template's static variables.
  DEBUG ─ Collecting components from the template.
  DEBUG ─ Downloading any NPM components found in the template.
  DEBUG ─ Analyzing the template's components dependencies.
  DEBUG ─ Creating the template's components graph.
  DEBUG ─ Syncing template state.
  DEBUG ─ Executing the template's components graph.
  DEBUG ─ Preparing website Tencent COS bucket my-bucket-hexo-1257857641.
  DEBUG ─ Bucket "my-bucket-hexo-1257857641" in the "ap-guangzhou" region already exist.
  DEBUG ─ Setting ACL for "my-bucket-hexo-1257857641" bucket in the "ap-guangzhou" region.
  DEBUG ─ Ensuring no CORS are set for "my-bucket-hexo-1257857641" bucket in the "ap-guangzhou" region.
  DEBUG ─ Ensuring no Tags are set for "my-bucket-hexo-1257857641" bucket in the "ap-guangzhou" region.
  DEBUG ─ Configuring bucket my-bucket-hexo-1257857641 for website hosting.
  DEBUG ─ Uploading website files from /Users/hanwei/mywork/5.my_blog/backendcloud-3-hexo/public to bucket my-bucket-hexo-1257857641.
  DEBUG ─ Starting upload to bucket my-bucket-hexo-1257857641 in region ap-guangzhou
  DEBUG ─ Uploading directory /Users/hanwei/mywork/5.my_blog/backendcloud-3-hexo/public to bucket my-bucket-hexo-1257857641
  DEBUG ─ Website deployed successfully to URL: http://my-bucket-hexo-1257857641.cos-website.ap-guangzhou.myqcloud.com.
  myWebsite:
    url: http://my-bucket-hexo-1257857641.cos-website.ap-guangzhou.myqcloud.com
    env:
  32s › myWebsite › donelanguage-bash复制代码

参考: https://cloud.tencent.com/developer/article/1600265 https://github.com/tinafangkunding/serverless-hexo

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2021-01-21,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 后端云 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云服务器
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档