forked from DevOps/deploy.stack
IT Tools 部署栈
IT Tools 是一个面向开发者的在线工具集合,提供编码、转换、格式化、加密等多种实用功能。基于 Vue + TypeScript 构建,拥有良好的交互体验。
目录结构
| 文件 | 说明 |
|---|---|
compose.yml |
Docker Compose 部署配置 |
env.cfg |
环境变量(镜像版本,已 gitignore) |
env.cfg.example |
环境变量模板 |
部署命令
# 拉取镜像
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 运行):
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
相关链接
- GitHub: https://github.com/CorentinTh/it-tools
- 在线体验: https://it-tools.tech