forked from DevOps/deploy.stack
feat(it-tools): add readme and migrate image registry to hub.6t7.net
This commit is contained in:
@@ -8,4 +8,4 @@
|
|||||||
# $EDITOR env.cfg # 填入真实密码/密钥后保存
|
# $EDITOR env.cfg # 填入真实密码/密钥后保存
|
||||||
# docker compose -p it-tools --env-file ./env.cfg -f ./stack.yml up -d
|
# 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
|
||||||
|
|||||||
59
it-tools/readme.md
Normal file
59
it-tools/readme.md
Normal file
@@ -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:<tag> .
|
||||||
|
|
||||||
|
# 推送到仓库
|
||||||
|
docker push hub.6t7.net/cnphpbb/it-tools:<tag>
|
||||||
|
```
|
||||||
|
|
||||||
|
构建依赖:
|
||||||
|
- 构建阶段:`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: <https://github.com/CorentinTh/it-tools>
|
||||||
|
- 在线体验: <https://it-tools.tech>
|
||||||
Reference in New Issue
Block a user