docker/nginx/nginxbuilder.sh

23 lines
615 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 这个脚本现在只是一个包装器,调用两个新脚本
echo "步骤1: 替换配置文件中的环境变量..."
./replace_vars.sh
# 检查替换结果是否成功
if [ $? -ne 0 ]; then
echo "错误: 变量替换失败,中止构建"
exit 1
fi
echo ""
echo "变量替换已完成,请检查 temp_vhosts/ 目录中的文件"
echo "确认替换结果无误后按回车键继续构建镜像或按Ctrl+C取消"
read -p ""
echo ""
echo "步骤2: 构建Nginx镜像..."
echo "注意: SSL证书文件将从vhosts/cert/目录复制到镜像中的/etc/nginx/目录"
./build_image.sh