CAFECA-IO / ServerSwarm

micro service group
GNU General Public License v3.0
0 stars 0 forks source link

[Feature] Unable to store the public key, ... consistently in server swarm of isunfa #25

Closed arealclimber closed 1 month ago

arealclimber commented 1 month ago

[功能] 無法在 isunfa 的伺服器群中一致地儲存公鑰 => 查找跟 Jacky 討論之後發現是因為 docker-compose 裡沒有設定掛載該資料夾,所以重啟 docker 之後就會清空 => 解法就是在 docker 裡新增 volumes,將 ${HOME}/isunfa 導出到主機裡

arealclimber commented 1 month ago

${HOME}/isunfa 導出到主機裡,但是在重啟 docker container 過程出現一堆錯誤,最後在 comment out pusher 相關的 env 之後就不會在一開始或者之後更新時出錯


Error: NextRouter was not mounted

isunfa-1  |  ⚠ You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env
isunfa-1  |   ▲ Next.js 14.2.15
isunfa-1  |   - Experiments (use with caution):
isunfa-1  |     · instrumentationHook
isunfa-1  |
isunfa-1  |    Linting and checking validity of types ...
isunfa-1  |    Creating an optimized production build ...
isunfa-1  |  ✓ Compiled successfully
isunfa-1  |    Collecting page data ...
isunfa-1  |    Generating static pages (0/78) ...
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |
isunfa-1  | Error occurred prerendering page "/cn/beta/example". Read more: https://nextjs.org/docs/messages/prerender-error
isunfa-1  |
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |
isunfa-1  | Error occurred prerendering page "/beta/example". Read more: https://nextjs.org/docs/messages/prerender-error
isunfa-1  |
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |
isunfa-1  | Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
isunfa-1  |
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |
isunfa-1  | Error occurred prerendering page "/en/beta/example". Read more: https://nextjs.org/docs/messages/prerender-error
isunfa-1  |
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |
isunfa-1  | Error occurred prerendering page "/en/users/salary/bookkeeping". Read more: https://nextjs.org/docs/messages/prerender-error
isunfa-1  |
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |
isunfa-1  | Error occurred prerendering page "/tw/users/salary/bookkeeping". Read more: https://nextjs.org/docs/messages/prerender-error
isunfa-1  |
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |
isunfa-1  | Error occurred prerendering page "/cn/users/salary/bookkeeping". Read more: https://nextjs.org/docs/messages/prerender-error
isunfa-1  |
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |
isunfa-1  | Error occurred prerendering page "/cn/users/reports/my_reports". Read more: https://nextjs.org/docs/messages/prerender-error
isunfa-1  |
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |
isunfa-1  | Error occurred prerendering page "/tw/users/project". Read more: https://nextjs.org/docs/messages/prerender-error
isunfa-1  |
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  | Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
isunfa-1  |     at p (/isunfa/app/.next/server/chunks/6149.js:1:23442)
isunfa-1  |     at C (/isunfa/app/.next/server/chunks/72.js:23:124496)
isunfa-1  |     at renderWithHooks (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
isunfa-1  |     at renderIndeterminateComponent (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5732:15)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5957:7)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |     at renderNodeDestructive (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6087:14)
isunfa-1  |     at renderContextProvider (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5931:3)
isunfa-1  |     at renderElement (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6028:11)
isunfa-1  |     at renderNodeDestructiveImpl (/isunfa/app/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6115:11)
isunfa-1  |
isunfa-1  | Error occurred prerendering page "/en/mobile_upload". Read more: https://nextjs.org/docs/messages/prerender-error

看起來是 npm install 失敗

isunfa-1  | Cloning into '/isunfa/app'...
isunfa-1  | npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
isunfa-1  | npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
isunfa-1  | npm warn deprecated npmlog@5.0.1: This package is no longer supported.
isunfa-1  | npm warn deprecated gauge@3.0.2: This package is no longer supported.
isunfa-1  | npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
isunfa-1  | npm warn deprecated pino-multi-stream@6.0.0: No longer supported. Use the multi-stream support in the latest core Pino
isunfa-1  | npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
isunfa-1  | npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
isunfa-1  | npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
isunfa-1  | npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
isunfa-1  | npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
isunfa-1  |
isunfa-1  | > iSunFA@0.8.2 prepare
isunfa-1  | > husky
isunfa-1  |
isunfa-1  | sh: 1: husky: not found
isunfa-1  | npm error code 127
isunfa-1  | npm error path /isunfa/app
isunfa-1  | npm error command failed
isunfa-1  | npm error command sh -c husky
isunfa-1  | npm notice
isunfa-1  | npm notice New minor version of npm available! 10.8.2 -> 10.9.0
isunfa-1  | npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
isunfa-1  | npm notice To update run: npm install -g npm@10.9.0
isunfa-1  | npm notice
isunfa-1  | npm error A complete log of this run can be found in: /root/.npm/_logs/2024-10-18T04_31_42_646Z-debug-0.log
isunfa-1  |
isunfa-1  | added 138 packages in 3s
isunfa-1  |
isunfa-1  | 13 packages are looking for funding
isunfa-1  |   run `npm fund` for details
isunfa-1  | Prisma schema loaded from prisma/schema.prisma
isunfa-1  | Datasource "db": PostgreSQL database "isunfa" at "211.22.118.147:5432"
isunfa-1  |
isunfa-1  | 1 migration found in prisma/migrations
isunfa-1  |
isunfa-1  |
isunfa-1  | No pending migrations to apply.
isunfa-1  | Error: Cannot find module 'tsconfig-paths/register'
isunfa-1  | Require stack:
isunfa-1  | - internal/preload
isunfa-1  |     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
isunfa-1  |     at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/isunfa/app/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
isunfa-1  |     at Function.Module._load (node:internal/modules/cjs/loader:1051:27)
isunfa-1  |     at internalRequire (node:internal/modules/cjs/loader:213:19)
isunfa-1  |     at Function.Module._preloadModules (node:internal/modules/cjs/loader:1695:5)
isunfa-1  |     at register (/isunfa/app/node_modules/ts-node/src/index.ts:610:46)
isunfa-1  |     at phase4 (/isunfa/app/node_modules/ts-node/src/bin.ts:554:11)
isunfa-1  |     at bootstrap (/isunfa/app/node_modules/ts-node/src/bin.ts:95:10)
isunfa-1  |     at main (/isunfa/app/node_modules/ts-node/src/bin.ts:55:10)
isunfa-1  |     at Object.<anonymous> (/isunfa/app/node_modules/ts-node/src/bin.ts:800:3) {
isunfa-1  |   code: 'MODULE_NOT_FOUND',
isunfa-1  |   requireStack: [ 'internal/preload' ]
isunfa-1  | }

遇到錯誤之後修改的 docker-compose

services:
  nginx:
    image: nginx:1.26.2
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/templates:/etc/nginx/templates
    env_file:
      - ./nginx/.env.nginx
    depends_on:
      - isunfa
      - faith
      - aich
    deploy:
      resources:
        limits:
          memory: 256M

  isunfa:
    # build:
    #   context: .
    #   dockerfile: ./isunfa/Dockerfile
    image: node:20
    volumes:
      - ./isunfa:/isunfa
      # - ${HOME}/isunfa:${HOME}/isunfa
    # working_dir: /isunfa/app
    command: >
      sh -c "chmod +x /isunfa/isunfa-start.sh && /isunfa/isunfa-start.sh"
    env_file:
      - ./isunfa/.env.isunfa
    environment:
      # - NODE_ENV=production
      - PORT=${ISUNFA_PORT}
    expose:
      - "${ISUNFA_PORT}"
    depends_on:
      aich:
        condition: service_healthy
      postgres:
        condition: service_started
    deploy:
      resources:
        limits:
          memory: 8G
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:${ISUNFA_PORT}"]
      interval: 30s
      timeout: 20s
      retries: 3
      start_period: 4m

  faith:
    image: node:20
    volumes:
      - ./faith:/faith
    command: >
      sh -c "chmod +x /faith/faith-start.sh && /faith/faith-start.sh"
    env_file:
      - ./faith/.env.faith
    environment:
      - PORT=${FAITH_PORT}
    expose:
      - "${FAITH_PORT}"
    depends_on:
      aich:
        condition: service_healthy
      ollama:
        condition: service_started
      qdrant:
        condition: service_started
    deploy:
      resources:
        limits:
          memory: 1G
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:${FAITH_PORT}"]
      interval: 30s
      timeout: 20s
      retries: 3
      start_period: 2m

  aich:
    image: node:20
    volumes:
      - ./aich:/aich
    command: >
      sh -c "chmod +x /aich/aich-start.sh && /aich/aich-start.sh"
    env_file:
      - ./aich/.env.aich
    environment:
      - PORT=${AICH_PORT}
    expose:
      - "${AICH_PORT}"
    depends_on:
      - ollama
      - qdrant
    deploy:
      resources:
        limits:
          memory: 2G
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:${AICH_PORT}"]
      interval: 30s
      timeout: 20s
      retries: 3
      start_period: 2m

  ollama:
    image: ollama/ollama:0.3.6
    volumes:
      - ./ollama:/root/.ollama
    restart: always
    # Info (20240822 - Jacky): Uncomment the following lines to enable GPU support.

    deploy:
      resources:
        limits:
          memory: 17G
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

    expose:
      - "${OLLAMA_PORT}"
    env_file:
      - ./ollama/.env.ollama
    entrypoint: ["/bin/sh", "-c"]
    command: >
      "chmod +x /root/.ollama/ollama-start.sh && /root/.ollama/ollama-start.sh"

  qdrant:
    image: qdrant/qdrant:v1.11.0
    restart: always
    expose:
      - "${QDRANT_PORT}"
    configs:
      - source: qdrant_config
        target: /qdrant/config/production.yaml
    volumes:
      - ./qdrant/qdrant_data:/qdrant/storage
    deploy:
      resources:
        limits:
          memory: 1G

  postgres:
    image: postgres:16
    ports:
      - "${POSTGRES_PORT}:${POSTGRES_PORT}"
    restart: always
    volumes:
      - ./postgres/data:/var/lib/postgresql/data
    env_file:
      - ./postgres/.env.postgres
    command: -c listen_addresses='*'
    expose:
      - "${POSTGRES_PORT}"
    deploy:
      resources:
        limits:
          memory: 1G

  ofelia:
    image: mcuadros/ofelia:latest
    container_name: ofelia
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./ofelia/config.ini:/etc/ofelia/config.ini
    # env_file:
    #   - ./ofelia/.env.ofelia
    environment:
      - TZ=Asia/Taipei
    command: >
      daemon --config=/etc/ofelia/config.ini
    depends_on:
      aich:
        condition: service_healthy
      isunfa:
        condition: service_healthy
      faith:
        condition: service_healthy
    deploy:
      resources:
        limits:
          memory: 1G

configs:
  qdrant_config:
    content: |
      log_level: INFO

修好之後可以 build,但是會出現跟 JWT 有關的錯

{"level":50,"time":1729237833245,"pid":913,"hostname":"97d38e96dfde","name":"console","message":"decryption operation failed","stack":"JWEDecryptionFailed: decryption operation failed\n    at gcmDecrypt (/isunfa/app/node_modules/jose/dist/node/cjs/runtime/decrypt.js:67:15)\n    at decrypt (/isunfa/app/node_modules/jose/dist/node/cjs/runtime/decrypt.js:92:20)\n    at flattenedDecrypt (/isunfa/app/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js:143:52)\n    at async compactDecrypt (/isunfa/app/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js:18:23)\n    at async jwtDecrypt (/isunfa/app/node_modules/jose/dist/node/cjs/jwt/decrypt.js:8:23)\n    at async Object.decode (/isunfa/app/node_modules/next-auth/jwt/index.js:56:7)\n    at async Object.session (/isunfa/app/node_modules/next-auth/core/routes/session.js:39:28)\n    at async AuthHandler (/isunfa/app/node_modules/next-auth/core/index.js:136:27)\n    at async NextAuthApiHandler (/isunfa/app/node_modules/next-auth/next/index.js:18:19)\n    at async K (/isunfa/app/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16881)","name":"JWEDecryptionFailed","msg":"[next-auth][error][JWT_SESSION_ERROR] \nhttps://next-auth.js.org/errors#jwt_session_error decryption operation failed"}

在更新的時候出現找不到 uuid 的錯誤,可能是 package json 安裝錯誤

isunfa-1  | fatal: destination path '/isunfa/app' already exists and is not an empty directory.
isunfa-1  | From https://github.com/CAFECA-IO/iSunFA
isunfa-1  |  * branch              develop    -> FETCH_HEAD
isunfa-1  |    dc9f2067..356f5b68  develop    -> origin/develop
isunfa-1  | error: Your local changes to the following files would be overwritten by merge:
isunfa-1  |     package.json
isunfa-1  | Please commit your changes or stash them before you merge.
isunfa-1  | Aborting
isunfa-1  | Updating 01a62583..356f5b68
isunfa-1  |
isunfa-1  | > iSunFA@0.8.2+70 prepare
isunfa-1  | > husky
isunfa-1  |
isunfa-1  | sh: 1: husky: not found
isunfa-1  | npm error code 127
isunfa-1  | npm error path /isunfa/app
isunfa-1  | npm error command failed
isunfa-1  | npm error command sh -c husky
isunfa-1  | npm notice
isunfa-1  | npm notice New minor version of npm available! 10.8.2 -> 10.9.0
isunfa-1  | npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
isunfa-1  | npm notice To update run: npm install -g npm@10.9.0
isunfa-1  | npm notice
isunfa-1  | npm error A complete log of this run can be found in: /root/.npm/_logs/2024-10-18T07_35_57_621Z-debug-0.log
isunfa-1  |
isunfa-1  | added 138 packages in 3s
isunfa-1  |
isunfa-1  | 13 packages are looking for funding
isunfa-1  |   run `npm fund` for details
isunfa-1  | Prisma schema loaded from prisma/schema.prisma
isunfa-1  | Datasource "db": PostgreSQL database "isunfa" at "211.22.118.147:5432"
isunfa-1  |
isunfa-1  | 3 migrations found in prisma/migrations
isunfa-1  |
isunfa-1  |
isunfa-1  | No pending migrations to apply.
isunfa-1  | Error: Cannot find module 'tsconfig-paths/register'
isunfa-1  | Require stack:
isunfa-1  | - internal/preload
isunfa-1  |     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
isunfa-1  |     at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/isunfa/app/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
isunfa-1  |     at Function.Module._load (node:internal/modules/cjs/loader:1051:27)
isunfa-1  |     at internalRequire (node:internal/modules/cjs/loader:213:19)
isunfa-1  |     at Function.Module._preloadModules (node:internal/modules/cjs/loader:1695:5)
isunfa-1  |     at register (/isunfa/app/node_modules/ts-node/src/index.ts:610:46)
isunfa-1  |     at phase4 (/isunfa/app/node_modules/ts-node/src/bin.ts:554:11)
isunfa-1  |     at bootstrap (/isunfa/app/node_modules/ts-node/src/bin.ts:95:10)
isunfa-1  |     at main (/isunfa/app/node_modules/ts-node/src/bin.ts:55:10)
isunfa-1  |     at Object.<anonymous> (/isunfa/app/node_modules/ts-node/src/bin.ts:800:3) {
isunfa-1  |   code: 'MODULE_NOT_FOUND',
isunfa-1  |   requireStack: [ 'internal/preload' ]
isunfa-1  | }
isunfa-1  |
isunfa-1  | > iSunFA@0.8.2+70 build
isunfa-1  | > npm run generate && next build
isunfa-1  |
isunfa-1  |
isunfa-1  | > iSunFA@0.8.2+70 generate
isunfa-1  | > prisma generate
isunfa-1  |
isunfa-1  | Prisma schema loaded from prisma/schema.prisma
isunfa-1  |
isunfa-1  | ✔ Generated Prisma Client (v5.21.1) to ./node_modules/@prisma/client in 424ms
isunfa-1  |
isunfa-1  | Start by importing your Prisma Client (See: http://pris.ly/d/importing-client)
isunfa-1  |
isunfa-1  | Tip: Interested in query caching in just a few lines of code? Try Accelerate today! https://pris.ly/tip-3-accelerate
isunfa-1  |
isunfa-1  |   ▲ Next.js 14.2.15
isunfa-1  |   - Experiments (use with caution):
isunfa-1  |     · instrumentationHook
isunfa-1  |
isunfa-1  |    Linting and checking validity of types ...
isunfa-1  |  ⨯ ESLint must be installed in order to run during builds: npm install --save-dev eslint
isunfa-1  | Failed to compile.
isunfa-1  |
isunfa-1  | ./src/components/journal_upload_area/journal_upload_area.tsx:1:30
isunfa-1  | Type error: Could not find a declaration file for module 'uuid'. '/isunfa/app/node_modules/uuid/dist/esm-browser/index.js' implicitly has an 'any' type.
isunfa-1  |   Try `npm i --save-dev @types/uuid` if it exists or add a new declaration (.d.ts) file containing `declare module 'uuid';`
isunfa-1  |
isunfa-1  | > 1 | import { v4 as uuidv4 } from 'uuid';
isunfa-1  |     |                              ^
isunfa-1  |   2 | import React, { useState, useEffect, useCallback } from 'react';
isunfa-1  |   3 | import { useTranslation } from 'next-i18next';
isunfa-1  |   4 | import Image from 'next/image';
isunfa-1  | 2024-10-18T07:36:24: PM2 log: Launching in no daemon mode
isunfa-1  | 2024-10-18T07:36:24: PM2 log: App [isunfa:0] starting in -fork mode-
isunfa-1  | 2024-10-18T07:36:24: PM2 log: App [isunfa:0] online
isunfa-1  | > iSunFA@0.8.2+70 start
isunfa-1  | > next start
isunfa-1  |   ▲ Next.js 14.2.15
isunfa-1  |   - Local:        http://localhost:5566
isunfa-1  |  ✓ Starting...
isunfa-1  |  ✓ Ready in 415ms
isunfa-1  | [07:37:16.101] ERROR (459): Request validation failed
isunfa-1  |     userId: 10000000
isunfa-1  |     url: "/api/v1/company/:companyId/ocr"
isunfa-1  |     method: "GET"
isunfa-1  |     statusCode: 400
isunfa-1  |     params: {
isunfa-1  |       "body": {
isunfa-1  |         "_errors": [
isunfa-1  |           "Expected string, received object"
isunfa-1  |         ]
isunfa-1  |       }
isunfa-1  |     }
isunfa-1  |     userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
isunfa-1  |     ipAddress: "::ffff:172.18.0.8"
arealclimber commented 1 month ago

took 5 hrs done