This commit is contained in:
juneix
2026-03-07 13:01:39 +08:00
parent f0b921d603
commit 0ae9155c2f
22 changed files with 5731 additions and 1608 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/bin/sh
set -e
# 默认参数
APP_LANG=${APP_LANG:-en}
APP_PORT=${APP_PORT:-8090}
echo "Current Configuration:"
echo " - Language: $APP_LANG"
echo " - Port: $APP_PORT"
# 动态修改 Nginx 监听端口
sed -i "s/listen 80;/listen ${APP_PORT};/g" /etc/nginx/conf.d/default.conf
# 清理 web 根目录
rm -rf /usr/share/nginx/html/*
# 根据环境变量选择性“部署”
if [ "$APP_LANG" = "zh" ]; then
echo "Deploying Chinese version..."
cp -rf /app/dist/zh/* /usr/share/nginx/html/
else
echo "Deploying English version..."
cp -rf /app/dist/en/* /usr/share/nginx/html/
fi
# 启动 nginx
exec nginx -g "daemon off;"