Finb / bark-server

Backend of Bark
https://bark.day.app
MIT License
2.56k stars 408 forks source link

serverless deployment #30

Closed visoar closed 3 weeks ago

visoar commented 3 years ago

Can bark-server deploy to aws lambda or other severless fuction sevices which has golang runtime. 是否可部署在 AWS lambda 或其他支持 go 运行时的云函数计算服务上

mritd commented 3 years ago

Currently we have not tested the severless service, obviously whether it supports. 当前并没有在 severless 服务上进行过测试,不确定是否支持。

JackyMaMa commented 3 years ago

+1 也有这个想法

SokaOfficial commented 3 years ago

+1 Serverless is much cheaper!

avtion commented 3 years ago

as far as I'm concerned, using serverless is better than deploy container on server, so i build a tencent cloud scf version. bark-serverless 我也觉得用Serverless服务会更有优势,所以实现了一个腾讯云SCF的版本 - bark-serverless,希望能有所帮助。

Finb commented 2 years ago

https://github.com/Finb/bark-server/commit/29f045981d05f1b9ba8d6eb197699494776da7f8 已经支持 serverless 。

先支持了一下 heroku 的一键部署

Deploy

其他serverless 服务器可以使用 bark-server -serverless true 开启 开启后, bark-server 会读取系统环境变量 BARK_KEY 和 BARK_DEVICE_TOKEN, 需提前设置好。

BARK_KEY 可任意填写(不能填 push ) BARK_DEVICE_TOKEN 等新版 APP上线后 APP内查看,或先不填写,在 APP 添加 serverless 服务器地址后,在日志里查看 devicetoken 。