chore: 添加构建推送脚本并更新项目配置

- 添加 build-and-push.sh 脚本用于自动化构建和推送 Docker 镜像
- 更新 .dockerignore 排除 pnpm-workspace.yaml
- 更新项目依赖和配置文件
This commit is contained in:
陈春
2026-06-03 17:19:14 +08:00
parent a4ee86a22b
commit c9cf644ac5
42 changed files with 41 additions and 0 deletions
Regular → Executable
+1
View File
@@ -1,5 +1,6 @@
# 依赖目录 # 依赖目录
node_modules/ node_modules/
pnpm-workspace.yaml
# 编译产出目录 # 编译产出目录
.output/ .output/
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Vendored Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File
View File
View File
View File
Regular → Executable
View File
View File
View File
View File
View File
View File
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Vendored Regular → Executable
View File
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
set -euo pipefail
# ==========================================
# 配置
# ==========================================
REGISTRY="git.virtheart.com"
OWNER="virtheart"
IMAGE="personal"
TAG="latest"
FULL_IMAGE="${REGISTRY}/${OWNER}/${IMAGE}:${TAG}"
# ==========================================
# 1. 登录 Registry
# ==========================================
echo ">>> [1/3] 登录 Registry: ${REGISTRY}"
echo "0218Virtheart@2025" | docker login "${REGISTRY}" -u "chenchun@virtheart.com" --password-stdin
# ==========================================
# 2. 构建镜像
# ==========================================
echo ">>> [2/3] 构建镜像: ${FULL_IMAGE}"
docker build -t "${FULL_IMAGE}" .
# ==========================================
# 3. 推送镜像
# ==========================================
echo ">>> [3/3] 推送镜像: ${FULL_IMAGE}"
docker push "${FULL_IMAGE}"
# ==========================================
# 清理本地镜像
# ==========================================
echo ">>> 清理本地镜像: ${FULL_IMAGE}"
docker rmi "${FULL_IMAGE}" || true
echo ">>> 完成!镜像已推送到 ${FULL_IMAGE},本地镜像已清理"
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Generated Regular → Executable
View File
+3
View File
@@ -0,0 +1,3 @@
allowBuilds:
'@parcel/watcher': set this to true or false
esbuild: set this to true or false
Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 279 KiB

After

Width:  |  Height:  |  Size: 279 KiB

Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File