@@ -3,8 +3,10 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name="robots" content="noindex, nofollow, noarchive" />
|
<meta name="robots" content="noindex, nofollow, noarchive, nosnippet" />
|
||||||
<title>杜康好客 · HQ 管理后台</title>
|
<meta name="baiduspider" content="noindex, nofollow, noarchive, nosnippet" />
|
||||||
|
<meta name="googlebot" content="noindex, nofollow, noarchive, nosnippet" />
|
||||||
|
<title>管理后台</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
1aacdfe9dcc03f68e4dd855f8c4c8f33
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
Disallow: /
|
Allow: /
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"cleanUrls": false,
|
||||||
|
"trailingSlash": false,
|
||||||
|
"rewrites": [
|
||||||
|
{ "source": "**", "destination": "/index.html" }
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -3,7 +3,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
||||||
<meta name="robots" content="noindex, nofollow, noarchive" />
|
<meta name="robots" content="noindex, nofollow, noarchive, nosnippet" />
|
||||||
|
<meta name="baiduspider" content="noindex, nofollow, noarchive, nosnippet" />
|
||||||
<title>城市合伙人</title>
|
<title>城市合伙人</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
Disallow: /
|
Allow: /
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||||
<meta name="robots" content="noindex, nofollow, noarchive" />
|
<meta name="robots" content="noindex, nofollow, noarchive, nosnippet" />
|
||||||
|
<meta name="baiduspider" content="noindex, nofollow, noarchive, nosnippet" />
|
||||||
<title>门店管理中心</title>
|
<title>门店管理中心</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
Disallow: /
|
Allow: /
|
||||||
|
|||||||
@@ -46,10 +46,11 @@ module.exports = {
|
|||||||
exec_mode: 'fork',
|
exec_mode: 'fork',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
// cleanUrls:false 见 apps/admin-web/serve.json;否则百度校验 .html 会被 301 去后缀
|
||||||
name: 'dukang-admin-web',
|
name: 'dukang-admin-web',
|
||||||
cwd: `${APP_ROOT}/apps/admin-web`,
|
cwd: `${APP_ROOT}/apps/admin-web`,
|
||||||
script: 'npx',
|
script: 'npx',
|
||||||
args: 'serve -s dist -l 8094',
|
args: 'serve dist -l 8094 -c serve.json',
|
||||||
interpreter: 'none',
|
interpreter: 'none',
|
||||||
instances: 1,
|
instances: 1,
|
||||||
exec_mode: 'fork',
|
exec_mode: 'fork',
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ module.exports = {
|
|||||||
name: 'dukang-stg-admin-web',
|
name: 'dukang-stg-admin-web',
|
||||||
cwd: `${APP_ROOT}/apps/admin-web`,
|
cwd: `${APP_ROOT}/apps/admin-web`,
|
||||||
script: 'npx',
|
script: 'npx',
|
||||||
args: 'serve -s dist -l 8194',
|
args: 'serve dist -l 8194 -c serve.json',
|
||||||
interpreter: 'none',
|
interpreter: 'none',
|
||||||
instances: 1,
|
instances: 1,
|
||||||
exec_mode: 'fork',
|
exec_mode: 'fork',
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
# 禁止搜索引擎抓取(shop / partner / admin,含测试域)
|
# 禁止搜索引擎收录(shop / partner / admin,含测试域)
|
||||||
# 合规爬虫读 robots.txt;X-Robots-Tag 覆盖不先读 robots.txt 的抓取器
|
# 必须允许抓取页面:Disallow:/ 会让百度无法读到 noindex,旧标题会一直留在 SERP。
|
||||||
|
# X-Robots-Tag 覆盖不先读 robots.txt / 不执行 JS 的抓取器。
|
||||||
|
|
||||||
add_header X-Robots-Tag "noindex, nofollow, noarchive" always;
|
add_header X-Robots-Tag "noindex, nofollow, noarchive, nosnippet" always;
|
||||||
|
|
||||||
location = /robots.txt {
|
location = /robots.txt {
|
||||||
default_type text/plain;
|
default_type text/plain;
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
add_header X-Robots-Tag "noindex, nofollow, noarchive" always;
|
add_header X-Robots-Tag "noindex, nofollow, noarchive, nosnippet" always;
|
||||||
return 200 "User-agent: *\nDisallow: /\n";
|
return 200 "User-agent: *\nAllow: /\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,19 +138,26 @@ if [[ "$SKIP_BUILD" == false ]]; then
|
|||||||
if [[ -f "$APP_ROOT/apps/mini-user/serve.json" ]]; then
|
if [[ -f "$APP_ROOT/apps/mini-user/serve.json" ]]; then
|
||||||
cp -f "$APP_ROOT/apps/mini-user/serve.json" "$APP_ROOT/apps/mini-user/dist/serve.json"
|
cp -f "$APP_ROOT/apps/mini-user/serve.json" "$APP_ROOT/apps/mini-user/dist/serve.json"
|
||||||
fi
|
fi
|
||||||
|
if [[ -f "$APP_ROOT/apps/admin-web/serve.json" ]]; then
|
||||||
|
cp -f "$APP_ROOT/apps/admin-web/serve.json" "$APP_ROOT/apps/admin-web/dist/serve.json"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "==> 4. 跳过构建"
|
echo "==> 4. 跳过构建"
|
||||||
if [[ -f "$APP_ROOT/apps/mini-user/serve.json" && -d "$APP_ROOT/apps/mini-user/dist" ]]; then
|
if [[ -f "$APP_ROOT/apps/mini-user/serve.json" && -d "$APP_ROOT/apps/mini-user/dist" ]]; then
|
||||||
cp -f "$APP_ROOT/apps/mini-user/serve.json" "$APP_ROOT/apps/mini-user/dist/serve.json"
|
cp -f "$APP_ROOT/apps/mini-user/serve.json" "$APP_ROOT/apps/mini-user/dist/serve.json"
|
||||||
fi
|
fi
|
||||||
|
if [[ -f "$APP_ROOT/apps/admin-web/serve.json" && -d "$APP_ROOT/apps/admin-web/dist" ]]; then
|
||||||
|
cp -f "$APP_ROOT/apps/admin-web/serve.json" "$APP_ROOT/apps/admin-web/dist/serve.json"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "==> 5. 重启 PM2 ($ECOSYSTEM_FILE)"
|
echo "==> 5. 重启 PM2 ($ECOSYSTEM_FILE)"
|
||||||
if pm2 describe "$PM2_API" &>/dev/null; then
|
if pm2 describe "$PM2_API" &>/dev/null; then
|
||||||
pm2 delete "$PM2_USER" 2>/dev/null || true
|
pm2 delete "$PM2_USER" 2>/dev/null || true
|
||||||
|
pm2 delete "$PM2_ADMIN" 2>/dev/null || true
|
||||||
pm2 start "$DEPLOY_DIR/$ECOSYSTEM_FILE" --only "$PM2_USER"
|
pm2 start "$DEPLOY_DIR/$ECOSYSTEM_FILE" --only "$PM2_USER"
|
||||||
pm2 restart "$PM2_API" "$PM2_SHOP" "$PM2_PARTNER" "$PM2_ADMIN" 2>/dev/null \
|
pm2 start "$DEPLOY_DIR/$ECOSYSTEM_FILE" --only "$PM2_ADMIN"
|
||||||
|| pm2 restart "$PM2_API" "$PM2_SHOP" "$PM2_PARTNER"
|
pm2 restart "$PM2_API" "$PM2_SHOP" "$PM2_PARTNER" 2>/dev/null || true
|
||||||
else
|
else
|
||||||
pm2 start "$DEPLOY_DIR/$ECOSYSTEM_FILE"
|
pm2 start "$DEPLOY_DIR/$ECOSYSTEM_FILE"
|
||||||
fi
|
fi
|
||||||
@@ -173,11 +180,9 @@ APP_ROOT="$APP_ROOT" DEPLOY_TRIGGER="${DEPLOY_TRIGGER:-manual}" DUKANG_ENV_FILE=
|
|||||||
|
|
||||||
echo "==> 发版完成 ($DUKANG_DEPLOY_ENV)"
|
echo "==> 发版完成 ($DUKANG_DEPLOY_ENV)"
|
||||||
|
|
||||||
if [[ "$DUKANG_DEPLOY_ENV" == "staging" ]]; then
|
echo "==> 8. 重载 nginx(robots.txt / 校验文件等 include 配置)"
|
||||||
echo "==> 8. 重载 nginx(staging)"
|
if command -v nginx >/dev/null 2>&1 && nginx -t 2>/dev/null; then
|
||||||
if command -v nginx >/dev/null 2>&1 && nginx -t 2>/dev/null; then
|
systemctl reload nginx || echo "WARN: nginx reload failed"
|
||||||
systemctl reload nginx || echo "WARN: nginx reload failed"
|
else
|
||||||
else
|
echo "WARN: nginx 未安装或配置校验失败,跳过重载"
|
||||||
echo "WARN: nginx 未安装或配置校验失败,跳过重载"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user