4

微信云托管项目部署

 2 years ago
source link: https://www.xn2001.com/archives/655.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

微信云托管项目部署

请注意,本文编写于 232 天前,最后修改于 232 天前,其中某些信息可能已经过时。

又一个快速部署不用自己搭建云服务器的黑科技,安利起来。

微信云托管是基于 Docker 来完成镜像的自动化构建部署,因此仓库项目需要拥有 Dockerfile 文件。

【新建版本】

这里选择 github,会提示授权,然后就可以选择仓库啦。打开高级配置还可以选择 CPU 等信息。

注意:Docker 容器端口必须在 【新建版本】时保持一致。例如:我的音乐接口暴露的端口号为:3000,那我监听端口也应该为 3000

【部署发布】

点击全量发布,返回服务列表,可以看到公网域名就可以使用啦。

可以重新写云函数调用,我懒得改代码就直接用公网域名请求了,真的很快很丝滑。



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK