bert_base/deploy.sh

27 lines
707 B
Bash

#!/bin/bash
echo "=========================================="
echo "Deploying bert-all-services..."
echo "=========================================="
# 1. 登录阿里云镜像仓库
echo ""
echo "[1] Logging into Aliyun Container Registry..."
docker login --username=dt_1789217881 registry.cn-chengdu.aliyuncs.com <<EOF
a5526801
EOF
# 2. 停止并移除旧容器(如果存在)
echo ""
echo "[2] Stopping and removing old container..."
docker compose down 2>/dev/null || echo " No existing container"
# 3. 构建并启动
echo ""
echo "[3] Building and starting services..."
docker compose up -d --build
# 4. 查看日志
echo ""
echo "[4] Showing logs (Ctrl+C to exit)..."
docker compose logs -f