diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index ca7d67c..12eb343 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -29,6 +29,25 @@ jobs: - name: Build run: npm run build + + - name: 🔍 Debug - List Build Files + run: | + echo "=======================" + echo "1. Root directory files:" + ls -la + + echo "=======================" + echo "2. Checking .next directory:" + if [ -d ".next" ]; then + ls -la .next + else + echo "❌ Error: .next folder does not exist!" + fi + + echo "=======================" + echo "3. Deep check of .next (excluding node_modules):" + # 查找 .next 目录下 4 层深度的文件,但排除 node_modules 避免日志太长 + find .next -maxdepth 4 -not -path '*/node_modules*' - name: Prepare standalone build run: | diff --git a/Dockerfile b/Dockerfile index 6dc972b..87fdc7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ -FROM node:22-alpine AS runner +FROM node:22-bookworm-slim AS runner WORKDIR /app ENV NODE_ENV production +ENV NEXT_PRIVATE_STANDALONE true RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs