From cabbd03ca4f3aadbbea5f8a08eb313de2ea5cbdd Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Sun, 14 Jun 2026 04:04:27 +0800 Subject: [PATCH] feat(it-tools): add readme and migrate image registry to hub.6t7.net --- it-tools/env.cfg.example | 2 +- it-tools/readme.md | 59 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 it-tools/readme.md diff --git a/it-tools/env.cfg.example b/it-tools/env.cfg.example index 0b45073..8613c78 100644 --- a/it-tools/env.cfg.example +++ b/it-tools/env.cfg.example @@ -8,4 +8,4 @@ # $EDITOR env.cfg # 填入真实密码/密钥后保存 # docker compose -p it-tools --env-file ./env.cfg -f ./stack.yml up -d # -IMAGE_TAG=hub.tp229.com:3500/cnphpbb/it-tools:20241022 +IMAGE_TAG=hub.6t7.net/cnphpbb/it-tools:20241022 diff --git a/it-tools/readme.md b/it-tools/readme.md new file mode 100644 index 0000000..f42e36a --- /dev/null +++ b/it-tools/readme.md @@ -0,0 +1,59 @@ +# IT Tools 部署栈 + +[IT Tools](https://github.com/CorentinTh/it-tools) 是一个面向开发者的在线工具集合,提供编码、转换、格式化、加密等多种实用功能。基于 Vue + TypeScript 构建,拥有良好的交互体验。 + +## 目录结构 + +| 文件 | 说明 | +|------|------| +| `compose.yml` | Docker Compose 部署配置 | +| `env.cfg` | 环境变量(镜像版本,已 gitignore) | +| `env.cfg.example` | 环境变量模板 | + +## 部署命令 + +```bash +# 拉取镜像 +docker compose -p it-tools --env-file ./it-tools/env.cfg -f ./it-tools/compose.yml pull + +# 部署 +docker compose -p it-tools --env-file ./it-tools/env.cfg -f ./it-tools/compose.yml up -d +``` + +## 环境变量 + +| 变量 | 说明 | 示例 | +|------|------|------| +| `IMAGE_TAG` | 完整镜像标签 | `hub.6t7.net/cnphpbb/it-tools:20241022` | + +## 服务端口 + +| 宿主机 | 容器 | +|--------|------| +| `8380` | `80` | + +## Docker 构建说明 + +上游仓库包含 `Dockerfile`,支持多阶段构建(node 构建 → nginx 运行): + +```bash +git clone https://github.com/CorentinTh/it-tools.git +cd it-tools + +# 构建镜像 +docker buildx build --platform linux/amd64 -t hub.6t7.net/cnphpbb/it-tools: . + +# 推送到仓库 +docker push hub.6t7.net/cnphpbb/it-tools: +``` + +构建依赖: +- 构建阶段:`node:lts-alpine` + `pnpm`,执行 `pnpm build` 生成静态文件 +- 运行阶段:`nginx:stable-alpine`,提供 `nginx.conf` 自定义配置 +- 环境变量:`NPM_CONFIG_LOGLEVEL=warn`、`CI=true` +- 上游 Dockerfile 参考:[Dockerfile](https://github.com/CorentinTh/it-tools/blob/main/Dockerfile) + +## 相关链接 + +- GitHub: +- 在线体验: \ No newline at end of file