中文 | English
更多应用案例,可以参考 Serverless Regsitry:http://www.devsapp.cn
本仓库是Serverless Devs阿里云系列的Awesome,在这里可以查看到关于阿里云相关组件的大部分内容。除了下面正文中的详细信息,您还可能需要关注:
- Serverless Devs与CICD的结合
- 函数计算组件文档 与 函数计算快速入门文档
- Serverless 应用引擎(SAE)文档 与 Serverless 应用引擎(SAE)快速入门文档
更多关于案例和内容,可以参考以下目录。
将一个传统框架部署到阿里云Serverless平台的方法有很多,可以选择Custom、Custom Container以及原生编程语言的运行时。这其中Custom和原生语言运行时方案,除了启动命令/入口函数不同之外,区别并不是很大,可以根据自己需求进行实现,Custom Container方案相对来说更简单,但是镜像的冷启动速度相对Custom和原生语言运行时比较慢。
目前函数计算仓库收录以下常见框架的部署案例:
No. | :fire:Nodejs | Python | PHP | Go | Java | Others |
---|---|---|---|---|---|---|
1 | :fire:Express [custom] | :fire::fire:Flask [python3] | Think PHP [custom] | BeeGo | Tomcat/Jetty | Gatsby |
2 | Egg [custom] | Tornado [custom] | laravel [custom] | Gin [custom] | SpringBoot [custom] | Hugo [custom] |
3 | Nextjs [custom] | Bottle [python3] | Discuz [custom] | Quarkus | ||
4 | Nuxtjs [custom] | Web.py [python3] | :fire::fire::fire: WordPress [custom] | |||
5 | :fire::fire::fire: Hapi [custom] | Django [python3] | :fire::fire::fire: Zblog [custom] | |||
6 | Koa [custom] | FastAPI [custom] | Ecshop [custom] | |||
7 | Nest [custom] | Web2py | Metinfo [custom] | |||
8 | Midway-koa [custom] | Pyramid [python3] | Whatsns [custom] | |||
9 | Serverless-Baota [custom] | Typecho [custom] | ||||
9 | Kodbox [custom] |
除了上面的案例之外,还提供了两个简单的实践应用:
- 基于Express框架的todoList应用:
s init todolist-app
- 基于Django框架的博客应用:
s init django-blog
SSR 框架:
- nuxt-ssr:
s init start-nuxt-ssr
s init website-hexo
s init website-docusaurus
s init website-vuepress
当然,上面所列举的静态网站案例都是build之后部署到对象存储等,您也可以直接部署到函数计算(尽管这并不是一个值得推荐的做法),您可以参考start-static-site文档 , 也可以尝试执行命令
s init start-static-site
进行初始化
s init start-pytorch
s init start-tensorflow
s init start-ocr
s init image-prediction-app
s init ffmpeg-app
s init rtmp-snapshot
s init headless-ffmpeg
s init start-fc-mysql-python
s init start-fc-redis-python
s init start-fc-mongodb-python
s init start-fc-sql-server-python
s init start-fc-postgresql-python
s init start-fc-lindorm-python
s init puppeteer-nodejs
s init puppeteer-container
s init start-word2pdf
s init start-pdf2img
s init start-fc-mall-admin
s init modern-web-application
这一部分记录的是一些活动的小案例,仅供学习使用
s init fc-nes-game
s init blindbox-game
s init start-jamstack-activities
s init start-barrage