This commit is contained in:
vipg
2025-12-26 16:33:11 +08:00
parent 5cee27cb72
commit 586ee37bf3
3 changed files with 9 additions and 6 deletions

View File

@@ -3,7 +3,11 @@
set -e # 遇到错误立即退出
# 定义表名变量,可以根据需要修改
TABLE_NAME="cn_pmi_234_aaarecords"
echo "🚀 启动Python容器执行create_table.py..."
echo "📋 目标表名: ${TABLE_NAME}"
# 获取脚本所在目录的绝对路径
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -24,6 +28,7 @@ docker run --rm \
--name "${CONTAINER_NAME}" \
-v "${SCRIPT_DIR}:/app/create" \
-v "${PROJECT_ROOT}/infra/postgres/sql:/app/infra/postgres/sql" \
-e TABLE_NAME="${TABLE_NAME}" \
-w /app \
python:3.13.7-alpine3.22 \
sh -c "