fix: 增加 Node.js 内存限制避免构建 OOM
Some checks are pending
continuous-integration/drone/push Build is running
Some checks are pending
continuous-integration/drone/push Build is running
This commit is contained in:
@@ -44,7 +44,8 @@ RUN echo "======================================" && \
|
|||||||
echo "======================================"
|
echo "======================================"
|
||||||
|
|
||||||
# 构建应用(使用环境变量中的API地址)
|
# 构建应用(使用环境变量中的API地址)
|
||||||
RUN npm run build
|
# 增加 Node.js 内存限制避免 OOM
|
||||||
|
RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build
|
||||||
|
|
||||||
# ============================================
|
# ============================================
|
||||||
# 生产阶段 - 轻量级nginx镜像
|
# 生产阶段 - 轻量级nginx镜像
|
||||||
|
|||||||
Reference in New Issue
Block a user