KenanZhu 4861439581
Build and publish website container / build (push) Successful in 6m48s
Refine download controls and simplify project documentation
2026-11-05 12:49:43 +08:00

AutoLibrary Website

AutoLibrary 官网、软件下载中心与主题市场,使用 Vue 3、TypeScript、Go/Gin、SQLite 和 Casdoor。

官网 · 用户手册 · 产品发布

本地开发

需要 Go 1.25.6+、Node.js 22.13+ 和支持 CGO 的 C 编译器。

cp config.example.json config.json
npm --prefix frontend ci
go run . backend
# 在另一个终端启动前端
npm --prefix frontend run dev

打开 http://127.0.0.1:5173。后端默认端口为 8080,登录功能需要配置 Casdoor。

构建与发布

npm --prefix frontend run build
go test ./...
docker build -t autolibrary-web:local .
bash deploy/smoke-container.sh autolibrary-web:local

推送 main 后,Gitea Actions 构建、测试并发布镜像到 gitea.kenanzhu.com/autolibrary/website:<提交SHA>。仓库 Secrets 需配置 REGISTRY_USERNAME 和具有软件包写入权限的 REGISTRY_TOKEN。

使用 compose.yaml 部署,设置 AUTOLIBRARY_IMAGE、AUTOLIBRARY_CONFIG、AUTOLIBRARY_DATA_DIR 和 AUTOLIBRARY_LOG_DIR,并按宿主机权限设置 AUTOLIBRARY_UID、AUTOLIBRARY_GID。前端健康检查端口由 AUTOLIBRARY_HTTP_PORT 指定,默认 3003。

配置只读挂载,数据库、主题文件和日志持久化在宿主机。上线前备份数据,更新 Compose 使用的镜像摘要后运行 docker compose up -d --wait。

S
Description
AutoLibrary 网站仓库 / Website repo for AutoLibrary
https://www.autolibrary.kenanzhu.com
Readme
1.1 MiB
0 Stars 1 Watchers 0 Forks
Languages
Go 39.6%
Vue 30.5%
CSS 17.6%
TypeScript 5.5%
Shell 2.2%
Other 4.6%