修改部署文档
This commit is contained in:
parent
081e2656f5
commit
24b0a4d307
@ -50,9 +50,29 @@ if ! ls python3*.rpm >/dev/null 2>&1; then
|
||||
fi
|
||||
rpm -Uvh --nodeps python3*.rpm
|
||||
|
||||
# Install Python packages using yum
|
||||
# Install Python packages from wheel files
|
||||
log_info "Installing Python packages..."
|
||||
yum install -y python3-flask python3-werkzeug python3-jinja2 python3-markupsafe
|
||||
if [ ! -d "${PROJECT_ROOT}/python" ]; then
|
||||
log_error "Python packages directory not found: ${PROJECT_ROOT}/python"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install wheel files in correct order
|
||||
log_info "Installing Python packages..."
|
||||
cd "${PROJECT_ROOT}/python"
|
||||
for pkg in MarkupSafe-2.0.1*.whl Jinja2-3.0.1*.whl \
|
||||
click-8.0.1*.whl itsdangerous-2.0.1*.whl \
|
||||
werkzeug-2.0.1*.whl flask-2.0.1*.whl; do
|
||||
if [ ! -f "$pkg" ]; then
|
||||
log_error "Required package not found: $pkg"
|
||||
exit 1
|
||||
fi
|
||||
log_info "Installing $pkg..."
|
||||
pip3 install --no-index --no-deps "$pkg" || {
|
||||
log_error "Failed to install $pkg"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
# Verify Python packages
|
||||
log_info "Verifying Python packages..."
|
||||
|
||||
@ -122,13 +122,14 @@ done
|
||||
|
||||
# Copy Python dependencies
|
||||
log_info "Copying Python dependencies..."
|
||||
pip3 download --no-deps -d "${DEPLOY_DIR}/python" \
|
||||
flask==2.0.1 \
|
||||
werkzeug==2.0.1 \
|
||||
click==8.0.1 \
|
||||
itsdangerous==2.0.1 \
|
||||
Jinja2==3.0.1 \
|
||||
MarkupSafe==2.0.1
|
||||
mkdir -p "${DEPLOY_DIR}/python"
|
||||
cd "${DEPLOY_DIR}/python"
|
||||
|
||||
# 下载所有依赖包及其依赖
|
||||
pip3 download \
|
||||
--no-deps \
|
||||
flask==2.0.1 werkzeug==2.0.1 click==8.0.1 \
|
||||
itsdangerous==2.0.1 Jinja2==3.0.1 MarkupSafe==2.0.1
|
||||
|
||||
# Copy configuration files
|
||||
log_info "Copying configuration files..."
|
||||
|
||||
Loading…
Reference in New Issue
Block a user