pandas-ai
pandas-ai copied to clipboard
docker-compose build failed
System Info
when i run docker-compose build,some error message as follows:
=> CACHED [client 3/6] COPY package*.json ./ 0.0s
=> CACHED [client 4/6] RUN npm config set registry https://registry.npmmirror.com && npm install 0.0s
=> [client 5/6] COPY . . 0.1s
=> ERROR [client 6/6] RUN npm run build 63.4s
------
> [client 6/6] RUN npm run build:
0.531
0.531 > [email protected] build
0.531 > next build
0.531
1.233 Attention: Next.js now collects completely anonymous telemetry regarding usage.
1.233 This information is used to shape Next.js' roadmap and prioritize features.
1.233 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
1.234 https://nextjs.org/telemetry
1.234
1.342 ▲ Next.js 14.2.3
1.343 - Environments: .env
1.345
1.441 Creating an optimized production build ...
52.48 ✓ Compiled successfully
52.48 Skipping linting
52.48 Checking validity of types ...
59.49 Collecting page data ...
61.94 Generating static pages (0/15) ...
62.24 Generating static pages (3/15)
62.35 Get request failed TypeError: fetch failed
62.35 at Object.fetch (node:internal/deps/undici/undici:14152:11)
62.35 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
62.35 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
62.35 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
62.35 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
62.35 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
62.35 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
62.35 errno: -111,
62.35 code: 'ECONNREFUSED',
62.35 syscall: 'connect',
62.35 address: '127.0.0.1',
62.35 port: 8000
62.35 }
62.35 }
62.35 TypeError: fetch failed
62.35 at Object.fetch (node:internal/deps/undici/undici:14152:11)
62.35 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
62.35 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
62.35 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
62.35 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
62.35 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
62.35 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
62.35 errno: -111,
62.35 code: 'ECONNREFUSED',
62.35 syscall: 'connect',
62.35 address: '127.0.0.1',
62.35 port: 8000
62.35 },
62.35 digest: '2074752815'
62.35 }
62.35 Get request failed TypeError: fetch failed
62.35 at Object.fetch (node:internal/deps/undici/undici:14152:11)
62.35 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
62.35 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
62.35 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
62.35 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
62.35 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
62.35 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
62.35 errno: -111,
62.35 code: 'ECONNREFUSED',
62.35 syscall: 'connect',
62.35 address: '127.0.0.1',
62.35 port: 8000
62.35 }
62.35 }
62.35 TypeError: fetch failed
62.35 at Object.fetch (node:internal/deps/undici/undici:14152:11)
62.35 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
62.35 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
62.35 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
62.35 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
62.35 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
62.35 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
62.35 errno: -111,
62.35 code: 'ECONNREFUSED',
62.35 syscall: 'connect',
62.35 address: '127.0.0.1',
62.35 port: 8000
62.35 },
62.35 digest: '2074752815'
62.35 }
62.35
62.35 Error occurred prerendering page "/settings/logs". Read more: https://nextjs.org/docs/messages/prerender-error
62.35
62.35 TypeError: fetch failed
62.35 at Object.fetch (node:internal/deps/undici/undici:14152:11)
62.35 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
62.35 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
62.35 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873)
62.81 Generating static pages (7/15)
63.00 Get request failed TypeError: fetch failed
63.00 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.00 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.00 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.00 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
63.00 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.00 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.00 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.00 errno: -111,
63.00 code: 'ECONNREFUSED',
63.00 syscall: 'connect',
63.00 address: '127.0.0.1',
63.00 port: 8000
63.00 }
63.00 }
63.00 TypeError: fetch failed
63.00 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.00 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.00 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.00 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
63.00 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.00 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.00 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.00 errno: -111,
63.00 code: 'ECONNREFUSED',
63.00 syscall: 'connect',
63.00 address: '127.0.0.1',
63.00 port: 8000
63.00 },
63.00 digest: '1717648049'
63.00 }
63.00 Get request failed TypeError: fetch failed
63.00 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.00 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.00 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.00 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
63.00 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.00 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.00 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.00 errno: -111,
63.00 code: 'ECONNREFUSED',
63.00 syscall: 'connect',
63.00 address: '127.0.0.1',
63.00 port: 8000
63.00 }
63.00 }
63.00 TypeError: fetch failed
63.00 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.00 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.00 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.00 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
63.00 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.00 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.00 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.00 errno: -111,
63.00 code: 'ECONNREFUSED',
63.00 syscall: 'connect',
63.00 address: '127.0.0.1',
63.00 port: 8000
63.00 },
63.00 digest: '1717648049'
63.00 }
63.00
63.00 Error occurred prerendering page "/settings/datasets". Read more: https://nextjs.org/docs/messages/prerender-error
63.00
63.00 TypeError: fetch failed
63.00 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.00 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.00 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.00 at async u (/app/build/server/app/settings/datasets/page.js:1:8848)
63.05 Generating static pages (11/15)
63.10 Get request failed TypeError: fetch failed
63.10 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.10 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.10 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.10 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
63.10 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.10 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.10 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.10 errno: -111,
63.10 code: 'ECONNREFUSED',
63.10 syscall: 'connect',
63.10 address: '127.0.0.1',
63.10 port: 8000
63.10 }
63.10 }
63.10 TypeError: fetch failed
63.10 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.10 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.10 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.10 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
63.10 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.10 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.10 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.10 errno: -111,
63.10 code: 'ECONNREFUSED',
63.10 syscall: 'connect',
63.10 address: '127.0.0.1',
63.10 port: 8000
63.10 },
63.10 digest: '2692158989'
63.10 }
63.10 Get request failed TypeError: fetch failed
63.10 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.10 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.10 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.10 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
63.10 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.10 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.10 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.10 errno: -111,
63.10 code: 'ECONNREFUSED',
63.10 syscall: 'connect',
63.10 address: '127.0.0.1',
63.10 port: 8000
63.10 }
63.10 }
63.10 TypeError: fetch failed
63.10 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.10 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.10 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.10 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
63.10 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.10 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.10 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.10 errno: -111,
63.10 code: 'ECONNREFUSED',
63.10 syscall: 'connect',
63.10 address: '127.0.0.1',
63.10 port: 8000
63.10 },
63.10 digest: '2692158989'
63.10 }
63.10
63.10 Error occurred prerendering page "/settings/workspaces/addspaces". Read more: https://nextjs.org/docs/messages/prerender-error
63.10
63.10 TypeError: fetch failed
63.10 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.10 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.10 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.10 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080)
63.17 Get request failed TypeError: fetch failed
63.17 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.17 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.17 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.17 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
63.17 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.17 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.17 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.17 errno: -111,
63.17 code: 'ECONNREFUSED',
63.17 syscall: 'connect',
63.17 address: '127.0.0.1',
63.17 port: 8000
63.17 }
63.17 }
63.17 TypeError: fetch failed
63.17 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.17 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.17 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.17 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
63.17 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.17 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.17 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.17 errno: -111,
63.17 code: 'ECONNREFUSED',
63.17 syscall: 'connect',
63.17 address: '127.0.0.1',
63.17 port: 8000
63.17 },
63.17 digest: '4144802943'
63.17 }
63.17 Get request failed TypeError: fetch failed
63.17 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.17 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.17 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.17 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
63.17 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.17 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.17 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.17 errno: -111,
63.17 code: 'ECONNREFUSED',
63.17 syscall: 'connect',
63.17 address: '127.0.0.1',
63.17 port: 8000
63.17 }
63.17 }
63.17 TypeError: fetch failed
63.17 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.17 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.17 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.17 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
63.17 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.17 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.17 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.17 errno: -111,
63.17 code: 'ECONNREFUSED',
63.17 syscall: 'connect',
63.17 address: '127.0.0.1',
63.17 port: 8000
63.17 },
63.17 digest: '4144802943'
63.17 }
63.17
63.17 Error occurred prerendering page "/settings/workspaces/editspaces". Read more: https://nextjs.org/docs/messages/prerender-error
63.17
63.17 TypeError: fetch failed
63.17 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.17 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.17 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.17 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135)
63.37 Get request failed TypeError: fetch failed
63.37 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.37 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.37 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
63.37 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
63.37 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.37 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.37 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.37 errno: -111,
63.37 code: 'ECONNREFUSED',
63.37 syscall: 'connect',
63.37 address: '127.0.0.1',
63.37 port: 8000
63.37 }
63.37 }
63.37 TypeError: fetch failed
63.37 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.37 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.37 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
63.37 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
63.37 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.37 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.37 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.37 errno: -111,
63.37 code: 'ECONNREFUSED',
63.37 syscall: 'connect',
63.37 address: '127.0.0.1',
63.37 port: 8000
63.37 },
63.37 digest: '3812785553'
63.37 }
63.37 Get request failed TypeError: fetch failed
63.37 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.37 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.37 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
63.37 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
63.37 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.37 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.37 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.37 errno: -111,
63.37 code: 'ECONNREFUSED',
63.37 syscall: 'connect',
63.37 address: '127.0.0.1',
63.37 port: 8000
63.37 }
63.37 }
63.37 TypeError: fetch failed
63.37 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.37 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.37 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
63.37 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
63.37 cause: Error: connect ECONNREFUSED 127.0.0.1:8000
63.37 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
63.37 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
63.37 errno: -111,
63.37 code: 'ECONNREFUSED',
63.37 syscall: 'connect',
63.37 address: '127.0.0.1',
63.37 port: 8000
63.37 },
63.37 digest: '3812785553'
63.37 }
63.37
63.37 Error occurred prerendering page "/settings/workspaces". Read more: https://nextjs.org/docs/messages/prerender-error
63.37
63.37 TypeError: fetch failed
63.37 at Object.fetch (node:internal/deps/undici/undici:14152:11)
63.37 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.37 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
63.37 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244)
63.37 ✓ Generating static pages (15/15)
63.37
63.37 > Export encountered errors on following paths:
63.37 /(ee)/settings/logs/page: /settings/logs
63.37 /settings/datasets/page: /settings/datasets
63.37 /settings/workspaces/addspaces/page: /settings/workspaces/addspaces
63.37 /settings/workspaces/editspaces/page: /settings/workspaces/editspaces
63.37 /settings/workspaces/page: /settings/workspaces
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
🐛 Describe the bug
version: master docker-compose.yml content as follows:
services:
postgresql:
image: postgres:16
environment:
POSTGRES_USER: pandasai
POSTGRES_PASSWORD: password123
POSTGRES_DB: pandasai-db
ports:
- "5430:5432"
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- pandabi-network
server:
container_name: pandabi-backend
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8000:8000"
restart: always
env_file:
- ./server/.env
depends_on:
- postgresql
networks:
- pandabi-network
command: "/bin/bash startup.sh"
client:
container_name: pandabi-frontend
depends_on:
- server
build:
context: ./client
dockerfile: Dockerfile
ports:
- "3000:3000"
restart: always
env_file:
- ./client/.env
environment:
- NODE_ENV=development
command: npm run start
networks:
- pandabi-network
networks:
pandabi-network:
driver: bridge
Hey @linlin-coder! I'm here to help you with any bugs or questions you have while waiting for the human maintainers. Let's squash those bugs together! 🐞
The build process fails with a connect ECONNREFUSED 127.0.0.1:8000 error because the client service is trying to connect to the server service on port 8000, but the server service is not running at the time of the build.
To resolve this issue, ensure that the server service is properly configured and running before the client service attempts to connect to it. Here are some steps to help you fix this:
-
Ensure
serverservice is running: Make sure theserverservice is up and running before theclientservice tries to connect. You can use thewait-for-it.shscript to wait for theserverservice to be available. -
Modify
clientDockerfile: Update theclientDockerfile to include a wait script that ensures theserverservice is available before running the build.
Here is an example of how you might modify the client Dockerfile:
# client/Dockerfile
FROM node:14
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
# Add wait-for-it.sh script
COPY wait-for-it.sh /wait-for-it.sh
RUN chmod +x /wait-for-it.sh
# Wait for the server to be available before running the build
CMD /wait-for-it.sh server:8000 -- npm run build
- Ensure
wait-for-it.shscript is available: Make sure thewait-for-it.shscript is available in theclientdirectory. Here is the content of thewait-for-it.shscript:
#!/bin/bash
host="$1"
shift
cmd="$@"
until nc -z "$host" 8000; do
>&2 echo "Server is unavailable - sleeping"
sleep 1
done
>&2 echo "Server is up - executing command"
exec $cmd
- Update
docker-compose.yml: Ensure theclientservice depends on theserverservice and waits for it to be ready.
services:
postgresql:
image: postgres:16
environment:
POSTGRES_USER: pandasai
POSTGRES_PASSWORD: password123
POSTGRES_DB: pandasai-db
ports:
- "5430:5432"
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- pandabi-network
server:
container_name: pandabi-backend
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8000:8000"
restart: always
env_file:
- ./server/.env
depends_on:
- postgresql
networks:
- pandabi-network
command: "/bin/bash startup.sh"
client:
container_name: pandabi-frontend
depends_on:
- server
build:
context: ./client
dockerfile: Dockerfile
ports:
- "3000:3000"
restart: always
env_file:
- ./client/.env
environment:
- NODE_ENV=development
command: npm run start
networks:
- pandabi-network
networks:
pandabi-network:
driver: bridge
By ensuring the server service is running and available before the client service attempts to connect, you should be able to resolve the ECONNREFUSED error during the build process [1][2].
To continue talking to Dosu, mention @dosu.
Same error, any solution yet?
到对应目录下面找到page.tsx文件里面添加这行: export const dynamic = 'force-dynamic'
这个项目太多坑...
export const dynamic = 'force-dynamic'
Guess it's something related to js... Finally it worked, thanks.
到对应目录下面找到page.tsx文件里面添加这行: export const dynamic = 'force-dynamic'
这个项目太多坑...
十分感谢,项目已启动起来
Same error, any solution yet?
You can refer to the above reply for settings, but the following files need to be modified
find -name "*page.tsx*"
./client/components/ChatLoader/page.tsx
./client/app/(ee)/settings/logs/page.tsx
./client/app/(ee)/settings/logs/[id]/page.tsx
./client/app/page.tsx
./client/app/admin/conversations/[id]/messages/page.tsx
./client/app/admin/page.tsx
./client/app/admin/chat/page.tsx
./client/app/settings/workspaces/page.tsx
./client/app/settings/workspaces/editspaces/page.tsx
./client/app/settings/workspaces/addspaces/page.tsx
./client/app/settings/workspaces/[id]/page.tsx
./client/app/settings/page.tsx
./client/app/settings/datasets/page.tsx
./client/app/settings/datasets/[id]/page.tsx
./client/app/settings/datasets/add/page.tsx
./client/app/settings/general/page.tsx
到对应目录下面找到page.tsx文件里面添加这行: export const dynamic = 'force-dynamic'
这个项目太多坑...
export const dynamic = 'force-dynamic'
Guess it's something related to js... Finally it worked, thanks.
Hey, Did you get it working? I am having the same issue. Added " export const dynamic = 'force-dynamic'" but did not help. See the content of my page.tsx below
"use client"; import { useRouter } from "next/navigation"; import React, { useEffect } from "react"; import { ROUTE_ADMIN } from "utils/constants"; import { useGetMe } from "@/hooks/useUsers"; import { Loader } from "@/components/loader/Loader";
export const dynamic = 'force-dynamic'
const MainPage = () => { const router = useRouter(); const { data: workspaceResponse, isLoading, isError } = useGetMe(); const myDetails = workspaceResponse?.data;
const handleSpaceClick = () => { localStorage.setItem("firstName", myDetails?.first_name); localStorage.setItem("email", myDetails?.email); localStorage.setItem("user_id", myDetails?.id); localStorage.setItem( "selectedOrganization", JSON.stringify(myDetails?.organizations[0]) ); localStorage.setItem("spaceId", myDetails?.space?.id); localStorage.setItem("spaceName", myDetails?.space?.name); router.push(ROUTE_ADMIN); };
useEffect(() => { if (workspaceResponse?.data) { handleSpaceClick(); } }, [workspaceResponse]);
return ( <> {isLoading && ( <div className="flex items-center justify-center m-auto h-full w-full"> <Loader /> )} {isError && ( <div className="flex items-center justify-center m-auto h-full w-full"> Something went wrong fetching credentials, please refresh the page )} </> ); };
export default MainPage;
Any update on this issue? Looks like docker setup is not working as expected.
Has anyone faced this issue on their Docker setup? Looks like it's not addressed yet.
can confirm issue, running docker on manjaro linux, spin up server container beforehand does not solve it
Any workaround here? Not able to get started because of this issue.
I added the following line to the bottom of all the 15 page.tsx files found using find -name "page.tsx" :
export const dynamic = 'force-dynamic';
Ran docker-compose build again and went through successfully.
@khoonie thanks a lot, could you submit a PR for that if it fixes the issue?
export const dynamic = 'force-dynamic';
It's worked, thank you very much