怎样在RailWay部署? #112
-
不是很明白docker原理,想请教如何在railway上进行部署 |
Beta Was this translation helpful? Give feedback.
Replies: 23 comments 1 reply
-
回到 cmd line:
https://docs.railway.app/develop/cli
|
Beta Was this translation helpful? Give feedback.
-
will init a new project, go to that project |
Beta Was this translation helpful? Give feedback.
-
add service, select postgresql |
Beta Was this translation helpful? Give feedback.
-
railway 创建的database 会自动 提供一个 DATABASE_URL 的环境变量. |
Beta Was this translation helpful? Give feedback.
-
click the "settings", add env var, api key 没有的乱填值就行了. |
Beta Was this translation helpful? Give feedback.
-
railway link
|
Beta Was this translation helpful? Give feedback.
-
然后, railway up, 需要在 chat/api 目录下 |
Beta Was this translation helpful? Give feedback.
-
回到 railway 网页, 添加var |
Beta Was this translation helpful? Give feedback.
-
需要一下五个: 因为main.go 里面写的是8080 |
Beta Was this translation helpful? Give feedback.
-
应该就可以了. 我已经成功部署并chat 了. |
Beta Was this translation helpful? Give feedback.
-
生成template 倒也是可以, 因为web, api 在 独立的folder 我得重写 Dockerfile, 有空再看吧. |
Beta Was this translation helpful? Give feedback.
-
部署之后, 注册用户, 第一个用户是管理员, 然后到 https://$hostname/static/#/admin/user 设置 ratelimit, 公网部署, 只对信任的email 增加 ratelimit, 这样即使有人注册, 也是不能用的. |
Beta Was this translation helpful? Give feedback.
-
非常感谢您的耐心解答,非常详细的步骤!我明天去试验一下。 |
Beta Was this translation helpful? Give feedback.
-
非常感谢您的耐心解答,非常详细的步骤!我明天去试验一下。 |
Beta Was this translation helpful? Give feedback.
-
用这个template 然后配置环境变量就可以了. PORT=8080 别的两个key 有就填. |
Beta Was this translation helpful? Give feedback.
-
railway 感觉要超过 fly.io 啊, 感觉丝滑很多. |
Beta Was this translation helpful? Give feedback.
-
非常感谢,大佬真效率! |
Beta Was this translation helpful? Give feedback.
-
再次感谢,我已经成功在railway上部署. |
Beta Was this translation helpful? Give feedback.
-
OPENAI_ACCESS_TOKEN 这个不是很懂, 看看有没有懂的. 你可以申请一个Claude的 early access key 目前是免费的,我这个项目也支持他家的key, 效果目前感觉快跟上open ai的模型了, 就是通过慢一点. |
Beta Was this translation helpful? Give feedback.
-
如果你自己用的话, 可以在 demo project 上面 https://chat-production-d90e.up.railway.app/ 注册个号, 我给你加ratelimit 你可以用, 这个demo project 我每次更新代码都会更新, 可能会有bug (顺便帮测试). 我暂时准备放弃自己本地部署了, 没有railway 这个自动更新方便. |
Beta Was this translation helpful? Give feedback.
-
👌,我前几天申请了Claude API KEY目前还没收到反馈,再等几天看看 |
Beta Was this translation helpful? Give feedback.
-
好的,非常感谢,多设备同步消息真的挺方便 |
Beta Was this translation helpful? Give feedback.
用这个template
然后配置环境变量就可以了.
PORT=8080
RATELIMITE=0
别的两个key 有就填.