someu / aigotools

AigoTools can help users quickly create and manage website directory, with built-in site auto-crawling features, and also provides internationalization, SEO, image storage, and other functions. It allows users to quickly deploy their own directory site online.
https://www.aigotools.com
Apache License 2.0
396 stars 73 forks source link

dockercompose up -d报错,是要先自己启动mongodb? #4

Closed zhangshuiyong closed 4 months ago

zhangshuiyong commented 4 months ago

203.8 ./src/lib/actions.ts 203.8 6:1 Warning: ./create-template-site import should occur after import of @/models/category import/order 203.8 7:1 Warning: ./constants import should occur after import of @/models/category import/order 203.8 8:1 Warning: ./config import should occur after import of @/models/category import/order 203.8 28:49 Warning: Insert , prettier/prettier 203.8 311:40 Warning: Insert , prettier/prettier 203.8 415:36 Warning: Insert , prettier/prettier 203.8 531:11 Warning: Insert , prettier/prettier 203.8 561:8 Warning: Insert , prettier/prettier 203.8 580:8 Warning: Insert , prettier/prettier 203.8 589:44 Warning: Insert , prettier/prettier 203.8 601:8 Warning: Insert , prettier/prettier 203.8 610:44 Warning: Insert , prettier/prettier 203.8 622:8 Warning: Insert , prettier/prettier 203.8 660:8 Warning: Insert , prettier/prettier 203.8 749:45 Warning: Insert , prettier/prettier 203.8 203.8 ./src/lib/config.ts 203.8 11:12 Warning: Insert , prettier/prettier 203.8 52:13 Warning: Insert , prettier/prettier 203.8 203.8 ./src/lib/cos.ts 203.8 14:22 Warning: Insert , prettier/prettier 203.8 42:7 Warning: Insert , prettier/prettier 203.8 203.8 ./src/lib/create-template-site.ts 203.8 3:1 Warning: @/models/site import should occur before import of ./constants import/order 203.8 203.8 ./src/lib/db-connect.ts 203.8 5:1 Warning: @/lib/config import should occur before import of ../models/site import/order 203.8 12:75 Warning: Insert , prettier/prettier 203.8 203.8 ./src/lib/minio.ts 203.8 18:22 Warning: Insert , prettier/prettier 203.8 38:8 Warning: Insert , prettier/prettier 203.8 58:7 Warning: Insert , prettier/prettier 203.8 203.8 ./src/lib/s3.ts 203.8 21:22 Warning: Insert , prettier/prettier 203.8 52:7 Warning: Insert , prettier/prettier 203.8 203.8 ./src/middleware.ts 203.8 38:34 Warning: Insert , prettier/prettier 203.8 203.8 info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules 211.6 Collecting page data ... 243.9 MongooseServerSelectionError: getaddrinfo ENOTFOUND aigotools-mongo 243.9 at _handleConnectionErrors (/app/node_modules/.pnpm/mongoose@8.5.0/node_modules/mongoose/lib/connection.js:897:11) 243.9 at NativeConnection.openUri (/app/node_modules/.pnpm/mongoose@8.5.0/node_modules/mongoose/lib/connection.js:848:11) 243.9 at async S (/app/.next/server/app/sitemap/[metadata_id]/route.js:1:3865) 243.9 at async w (/app/.next/server/app/sitemap/[metadata_id]/route.js:1:4541) 243.9 at async Object.I [as generateStaticParams] (/app/.next/server/app/sitemap/[metadata_id__]/route.js:1:5896) 243.9 at async buildParams (/app/node_modules/.pnpm/next@14.2.5_react-dom@18.3.1_react@18.3.1react@18.3.1_sass@1.69.7/node_modules/next/dist/build/utils.js:1026:40) 243.9 at async /app/node_modules/.pnpm/next@14.2.5_react-dom@18.3.1_react@18.3.1react@18.3.1_sass@1.69.7/node_modules/next/dist/build/utils.js:1043:33 243.9 at async /app/node_modules/.pnpm/next@14.2.5_react-dom@18.3.1_react@18.3.1__react@18.3.1_sass@1.69.7/node_modules/next/dist/build/utils.js:1177:114 243.9 at async Span.traceAsyncFn (/app/node_modules/.pnpm/next@14.2.5_react-dom@18.3.1_react@18.3.1react@18.3.1_sass@1.69.7/node_modules/next/dist/trace/trace.js:154:20) { 243.9 reason: TopologyDescription { 243.9 type: 'Unknown', 243.9 servers: Map(1) { 'aigotools-mongo:27017' => [ServerDescription] }, 243.9 stale: false, 243.9 compatible: true, 243.9 heartbeatFrequencyMS: 10000, 243.9 localThresholdMS: 15, 243.9 setName: null, 243.9 maxElectionId: null, 243.9 maxSetVersion: null, 243.9 commonWireVersion: 0, 243.9 logicalSessionTimeoutMinutes: null 243.9 }, 243.9 code: undefined 243.9 } 243.9 243.9 > Build error occurred 243.9 Error: Failed to collect page data for /sitemap/[metadata_id__] 243.9 at /app/node_modules/.pnpm/next@14.2.5_react-dom@18.3.1_react@18.3.1react@18.3.1_sass@1.69.7/node_modules/next/dist/build/utils.js:1268:15 { 243.9 type: 'Error' 243.9 } 244.1  ELIFECYCLE  Command failed with exit code 1.

failed to solve: process "/bin/sh -c apk add --no-cache libc6-compat && npm config set strict-ssl false && npm config set fetch-retries 10 && corepack enable pnpm && pnpm i && mv next.config.docker.js next.config.js && pnpm run build" did not complete successfully: exit code: 1

someu commented 4 months ago

对的,sitemap是动态的,打包的时候会通过当前站点数量生成站点id

fleetof commented 4 months ago

本地部署报同样的错误,请问解决了么?

先启动 MongoDB 是什么意思?我理解的是构建过程中它会自己启动。