chore: update .dockerignore to exclude lock files

This commit is contained in:
d0lwl0b
2025-10-30 00:28:39 +08:00
parent 280b45756d
commit b39399fe85
2 changed files with 22 additions and 25 deletions

View File

@@ -94,31 +94,31 @@ check_config() {
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
# Build: Frontend (Node.js Based) # Build: Frontend (Node.js Based)
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
build_frontend() { # build_frontend() {
print_info "检查前端构建环境..." # print_info "检查前端构建环境..."
if ! command -v node &> /dev/null; then # if ! command -v node &> /dev/null; then
print_error "Node.js 未安装!请先安装 Node.js" # print_error "Node.js 未安装!请先安装 Node.js"
exit 1 # exit 1
fi # fi
if ! command -v npm &> /dev/null; then # if ! command -v npm &> /dev/null; then
print_error "npm 未安装!请先安装 npm" # print_error "npm 未安装!请先安装 npm"
exit 1 # exit 1
fi # fi
print_info "正在构建前端..." # print_info "正在构建前端..."
cd web # cd web
print_info "安装 Node.js 依赖..." # print_info "安装 Node.js 依赖..."
npm install # npm install
print_info "构建前端应用..." # print_info "构建前端应用..."
npm run build # npm run build
cd .. # cd ..
print_success "前端构建完成" # print_success "前端构建完成"
} # }
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
# Service Management: Start # Service Management: Start
@@ -127,9 +127,9 @@ start() {
print_info "正在启动 NOFX AI Trading System..." print_info "正在启动 NOFX AI Trading System..."
# Auto-build frontend if missing or forced # Auto-build frontend if missing or forced
if [ ! -d "web/dist" ] || [ "$1" == "--build" ]; then # if [ ! -d "web/dist" ] || [ "$1" == "--build" ]; then
build_frontend # build_frontend
fi # fi
# Rebuild images if flag set # Rebuild images if flag set
if [ "$1" == "--build" ]; then if [ "$1" == "--build" ]; then

View File

@@ -1,8 +1,5 @@
# Dependencies # Dependencies
node_modules/ node_modules/
package-lock.json
yarn.lock
pnpm-lock.yaml
# Build output (will be regenerated) # Build output (will be regenerated)
dist/ dist/