mirror of
https://github.com/certimate-go/certimate.git
synced 2026-04-25 20:55:52 +03:00
[GH-ISSUE #736] [Feature] 不以服务启动,通过命令行运行工作流 #496
Labels
No labels
announcement
backlog
bug
declined
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
invalid
pull-request
question
stale
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/certimate#496
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gyf9835 on GitHub (May 28, 2025).
Original GitHub issue: https://github.com/certimate-go/certimate/issues/736
功能描述 / Description
通过命令行运行指定/全部工作流,不启动web服务,运行完成后退出
请求动机 / Motivation
经测试本应用运行时占用内存大约为200MB,而证书更新间隔时间相对较长,个人认为长时间将certimate作为服务运行有些浪费内存,200MB虽然不是很大,但是对于一些路由器/共享vps来说还是有一定压力的。所以希望推出一个不启动服务,只通过命令行运行指定/全部工作流的功能,或者将web服务与核心功能分开(通过单页面应用和api来控制核心服务)。在需要配置工作流时启动web,平时通过系统cron调用工作流,能极大地减少资源占用,拓展应用场景
其他 / Miscellaneous
No response
贡献 / Contribution
@fondoger commented on GitHub (May 28, 2025):
你试试限制一下Golang的内存大小呢?比如设置为64MB或者32MB,我理解应该也能正常运行。
加一个环境变量:
GOMEMLIMITPS: 我使用Docker部署最新版,才不到40MB内存。
@usual2970 commented on GitHub (May 28, 2025):
你好,你使用的哪个版本、哪种部署方式?
@gyf9835 commented on GitHub (May 28, 2025):
试了不太行,占用内存没有变化
昨天第一次尝试certimate在一个128MB的LXC alpine中运行失败,所以大概无法以较低内存稳定运行 #730
0.3.14,二进制安装在一个LXC alpine中,alpine版本:3.21.3@usual2970 commented on GitHub (May 28, 2025):
@fudiwei
二进制包体积优化负优化了😂
upx压缩的包运行方式是:解压到内存中运行,导致内存占用变大了。Certimate实际占用20M左右,比起内存硬盘多占用一点就无所谓了。
@fudiwei commented on GitHub (May 28, 2025):
先注释掉吧 😂
@gyf9835 commented on GitHub (May 28, 2025):
哈哈哈哈,我为了减少资源占用特意用了二进制文件没用docker,反倒占用更多了
那这个feature还要考虑吗?感觉和刚开的 #733 类似
@fudiwei commented on GitHub (May 28, 2025):
这个需求提得挺好的 👍,跟 #733 也不冲突,他这个是希望提供 HTTP API 接口,你的是通过 CLI。
先在需求池里留着吧。不过优先级不高,短期内可能没办法实现。
@lisinloft commented on GitHub (Jun 11, 2025):
我是在openwrt上部署的二进制文件3.14,内存在脚本里限制为512M,实际运行后,占用69%,大概202M。
我一直没注意可执行文件从3.14后激增,今天在手动更新3.17文件的时候才猛然发现的,找到这里,留个言说下我的运行情况,可能会成为一个参考,最后谢谢开发者的程序,很好用,加油~