# AutoLibrary Website AutoLibrary 官网、软件下载中心与主题市场,使用 Vue 3、TypeScript、Go/Gin、SQLite 和 Casdoor。 [官网](https://www.autolibrary.kenanzhu.com) · [用户手册](https://manuals.autolibrary.kenanzhu.com) · [产品发布](https://gitea.kenanzhu.com/KenanZhu/AutoLibrary/releases) ## 本地开发 需要 Go 1.25.6+、Node.js 22.13+ 和支持 CGO 的 C 编译器。 ```sh 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。 ## 构建与发布 ```sh npm --prefix frontend run build go test ./... docker build -t autolibrary-web:local . bash deploy/smoke-container.sh autolibrary-web:local ``` 推送 `main` 后,Gitea Actions 构建、测试并发布镜像,再提交生产更新请求。宿主机更新服务校验当前 `main` 与镜像摘要后更新网站容器,健康检查失败时回滚。仓库 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`。 配置只读挂载,数据库、主题文件和日志持久化在宿主机。生产安装 `deploy/systemd/autolibrary-update.*` 与 `deploy/update-container.py`;Runner 将专用请求目录挂载到 `/release-request`。更新日志使用 `journalctl -u autolibrary-update.service` 查看。