Add distribution release script and registry documentation

This commit is contained in:
chaos
2026-03-17 00:23:16 +08:00
parent 04ed3fb67a
commit 7dc9849e85
2 changed files with 43 additions and 0 deletions

28
release.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
# Vox 发布脚本:本地编译并打包 Docker 镜像
# 这种方式生成的镜像体积最小,且部署时无需在服务器上进行编译。
IMAGE_NAME="vox-app"
REGISTRY="gitea.qxy1828.com/chaos/vox"
TAG="latest"
echo "1. 清理并开始本地编译..."
rm -rf build/
npm install
npm run build
echo "2. 构建生产级 Docker 镜像..."
docker build -t ${IMAGE_NAME}:${TAG} -f Dockerfile.fast .
echo "3. 为注册表打标签..."
docker tag ${IMAGE_NAME}:${TAG} ${REGISTRY}:${TAG}
echo "------------------------------------------------"
echo "构建完成!"
echo "本地镜像名: ${IMAGE_NAME}:${TAG}"
echo "拟推送地址: ${REGISTRY}:${TAG}"
echo ""
echo "如需推送到 Gitea 仓库,请运行:"
echo "docker push ${REGISTRY}:${TAG}"
echo "------------------------------------------------"