-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
167 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
--- | ||
title: Render | ||
date: 2023-07-21 18:29 | ||
permalink: /guide/deploy/render | ||
article: false | ||
--- | ||
|
||
## 部署到Render: 免费的永远是最好的 | ||
|
||
[Render公有云地址](https://www.render.com/) | ||
|
||
> Render是一个新的PaaS( Platform as a service)云端服务,也就是说你的代码部署到Render之后,你不用(也不能)去管Linux/firewall/nginx的设定。把你的Github网址给Render,设定一下用鼠标点点点,等个几分钟,你的程序就上线了,全世界都能看到你的网站或是存取你提供的API。[(选自知乎)](https://zhuanlan.zhihu.com/p/377558120) | ||
我们来看一下官方是如何介绍自己的: | ||
|
||
> Build, deploy, and scale your apps with unparalleled ease – from your first user to your billionth. | ||
> | ||
其实这些都不重要,重要的是你只需要知道,<font color="pink"><b>render提供的free套餐完全支持我们部署 seamoon,不需要花费一分钱!</b></font>这就够了,足够我们给他树一个👍。 | ||
|
||
|
||
## 如何部署 | ||
|
||
render 部署与 sealos 部署一样简单,在新版本中,我会逐步减少部署步骤,降低这部分交互。 | ||
|
||
### Step.1 注册账户 | ||
|
||
render 账户支持 github / gitlab / google 等一键登陆,建议直接 github 账户登陆即可。 | ||
|
||
实在不行,他也支持邮箱注册,自己注册一个,此处不再废话。 | ||
|
||
![render-register](https://seamoon.oss-cn-hangzhou.aliyuncs.com/7d00a615cd45480bad1b7ade33b7e543.png) | ||
|
||
### Step.2 部署 | ||
|
||
注册账户登陆后,进入控制台,选择创建一个 web service 应用: | ||
|
||
![render-web-service](https://seamoon.oss-cn-hangzhou.aliyuncs.com/ffcd48fa203b4959bdde631bdf77610e.png) | ||
|
||
然后选第二个,从存在的镜像中部署服务: | ||
|
||
![render-web-deploy](https://seamoon.oss-cn-hangzhou.aliyuncs.com/faa0f096dcfa40998b518b5e4de96534.png) | ||
|
||
点击下一步,要求我们填写部署的镜像名称,我们填写:`dvkunion/seamoon` | ||
|
||
![render-image](https://seamoon.oss-cn-hangzhou.aliyuncs.com/3bc5a0437ea94a348f9841864f5c2df3.png) | ||
|
||
开始填写详细的应用字段了,我们依次填写: | ||
|
||
+ Name: 应用名称,这个最终会对应生成你的服务域名,因此这里我建议越复杂越好,因为 seamoon 当前版本没有做认证,导致如果服务名称过于简单,很容易被其他人连上。 | ||
+ Region: 地域,选择服务部署的地区,现在支持四个区域:oregon-俄勒冈州(美国西部)、Frankfurt-法兰克福(欧盟)、ohio-俄亥俄州(美国东部)、singapore-新加坡(东亚) | ||
+ 实例类型: 选免费的。 | ||
|
||
![render-config](https://seamoon.oss-cn-hangzhou.aliyuncs.com/160ff4f44e5a4e9d9128269dbc1a3e26.png) | ||
|
||
往下滑,看到 Docker Command 填写如下: | ||
|
||
![render-docker](https://seamoon.oss-cn-hangzhou.aliyuncs.com/51fa80f6e4c84ae985bdb23ac8acf673.png) | ||
|
||
完成,点击创建即可。 | ||
|
||
![render-url](https://seamoon.oss-cn-hangzhou.aliyuncs.com/158478ce77a84130b43f786670a40c65.png) | ||
|
||
### Step.3 本地客户端 | ||
|
||
在本地启动客户端,推荐 docker 一键拉起: | ||
|
||
```shell | ||
$ docker run -it -d --net=host dvkunion/seamoon proxy | ||
``` | ||
|
||
默认使用`--net=host`模式, 如需要高级设置,如下: | ||
|
||
```shell | ||
$ docker run -it -d -p 7777:7777 -p 1080:1080 dvkunion/seamoon proxy | ||
``` | ||
|
||
访问本地控制台 localhost:7777 , 将此地址填入客户端即可。 | ||
|
||
::: tip 如何填写地址 | ||
填写的代理在步骤2已经明确给出,给出的地址是 https:// 开头的,需要改为如: wss://。 | ||
|
||
grpc目前没有测试是否支持,测试支持后后续会更新文档并补充。 | ||
::: | ||
|
||
## 测试效果 | ||
|
||
整体机房是 amazon 的,所属地基本正确。 | ||
|
||
![render-cip](https://seamoon.oss-cn-hangzhou.aliyuncs.com/db670fef7f4f47cd95108a656c28c9a5.png) | ||
|
||
速度的话,也就是正常水平,基本满足日常浏览和视频播放的样子。 | ||
|
||
![render-speed](https://seamoon.oss-cn-hangzhou.aliyuncs.com/80aee46729ca4ecdbda4c244ac26835b.png) | ||
|
||
免费的来说已经是很不错的了。 | ||
|
||
## 一些小细节问题 | ||
|
||
<font color="red"><b>访问不到render/dashboard/github......</b></font> | ||
|
||
我的建议是,先用阿里云等国内方案临时解决访问一下,然后在方案 render 等作为长期持久使用的方案。 | ||
|
||
<font color="red"><b>支持 grpc 吗?</b></font> | ||
|
||
没做测试,个人测试使用的是 websocket 隧道,然后也没有发现官方文档中提到 grpc 相关的,有兴趣的各位可以试一下然后反馈给我。 | ||
|
||
<font color="red"><b>关于动态IP 问题</b></font> | ||
|
||
免费版本的 render 是不支持动态 scaling (动态伸缩扩容) 的,因此,这个方案部署的 seamoon 将会是一个固定 IP。 | ||
只有当 pod 销毁了,或者是你升级了套餐内容 (每月7刀) 才支持 scaling,才可以获取到动态 IP 的方案。 | ||
|
||
当然,事无绝对,你非要使用 "动态" + "免费" 的方式,也有,通过 api 调用每小时自动删除再创建应用,即可实现这个效果,还可以实现动态的地区变动。。。。 | ||
|
||
不过人家已经免费了,我不是非常建议这样做了。想要动态的 7刀一个月也不是一个过分的价格了,能支持的还是支持一下。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters