添加docker 部署agent
This commit is contained in:
@@ -9,6 +9,10 @@ set -e
|
||||
echo "[entrypoint] Replacing hardcoded domains in JS files..."
|
||||
|
||||
# 默认值(与 .env.example 对应)
|
||||
# 从 ROOT_DOMAIN 推导子域名(docker-compose.yml 通常已注入,这里仅作容器外单跑的兜底)
|
||||
_ROOT="${ROOT_DOMAIN:-daoqijuyou77.cn}"
|
||||
SITE_API_URL="${SITE_API_URL:-https://api.${_ROOT}}"
|
||||
SITE_PAY_NOTIFY_URL="${SITE_PAY_NOTIFY_URL:-https://api.${_ROOT}}"
|
||||
SITE_API2_URL="${SITE_API2_URL:-https://api2.tscce.cn}"
|
||||
QQ_CALLBACK_URL="${QQ_CALLBACK_URL:-http://syhd.daoqijuyou77.cn}"
|
||||
|
||||
@@ -28,8 +32,6 @@ if [ -f "$QQ_INC" ]; then
|
||||
fi
|
||||
|
||||
# 替换 sample 目录中的硬编码域名
|
||||
SITE_API_URL="${SITE_API_URL:-https://api.tscce.cn}"
|
||||
SITE_PAY_NOTIFY_URL="${SITE_PAY_NOTIFY_URL:-http://api.daoqijuyou77.cn}"
|
||||
for f in /var/www/html/sample/onlinepay/js/common.js; do
|
||||
if [ -f "$f" ]; then
|
||||
sed -i "s|var g_RequestAddress = 'https://api.tscce.cn'|var g_RequestAddress = '${SITE_API_URL}'|g" "$f"
|
||||
|
||||
Reference in New Issue
Block a user