#!/bin/sh

# 默认配置
API_URL=${API_URL:-"http://127.0.0.1:8000"}
APP_PORT_1=${APP_PORT_1:-8000}
RESOURCE_PATH=${RESOURCE_PATH:-"/app/.resource/resource_dev.json"}

# 设置环境变量
export API_URL
export APP_PORT_1
export RESOURCE_PATH

# 启动生产服务器
cd /app
echo "正在启动生产服务器..."
npm run build
npx serve -s dist -l $APP_PORT_1
