chore: 添加构建推送脚本并更新项目配置
- 添加 build-and-push.sh 脚本用于自动化构建和推送 Docker 镜像 - 更新 .dockerignore 排除 pnpm-workspace.yaml - 更新项目依赖和配置文件
This commit is contained in:
Regular → Executable
+1
@@ -1,5 +1,6 @@
|
|||||||
# 依赖目录
|
# 依赖目录
|
||||||
node_modules/
|
node_modules/
|
||||||
|
pnpm-workspace.yaml
|
||||||
|
|
||||||
# 编译产出目录
|
# 编译产出目录
|
||||||
.output/
|
.output/
|
||||||
|
|||||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Executable
+37
@@ -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
Regular → Executable
Regular → Executable
Regular → Executable
@@ -0,0 +1,3 @@
|
|||||||
|
allowBuilds:
|
||||||
|
'@parcel/watcher': set this to true or false
|
||||||
|
esbuild: set this to true or false
|
||||||
Regular → Executable
|
Before Width: | Height: | Size: 279 KiB After Width: | Height: | Size: 279 KiB |
Regular → Executable
Regular → Executable
Regular → Executable
Reference in New Issue
Block a user