I am trying to dockerize sveltekit app with pocketbase, and in local everything seems to be working, but in docker non of request passes and I am getting ambiguous error. Git repo: https://github.com/WingsDevelopment/dockerize-sveltekit-pocketbase/tree/main/my-app Everything about starting can be found in readme file in repo.
Error:
ClientResponseError 0: Something went wrong while processing your request.
2023-02-16 10:34:53 at new ClientResponseError (file:///app/node_modules/pocketbase/dist/pocketbase.es.mjs:1:2285)
2023-02-16 10:34:53 at file:///app/node_modules/pocketbase/dist/pocketbase.es.mjs:1:40471
2023-02-16 10:34:53 at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-02-16 10:34:53 at async GET (file:///app/build/server/chunks/_server.ts-49cdad99.js:4:20)
2023-02-16 10:34:53 at async render_endpoint (file:///app/build/server/index.js:1494:22)
2023-02-16 10:34:53 at async resolve (file:///app/build/server/index.js:3671:22)
2023-02-16 10:34:53 at async Object.handle (file:///app/build/server/chunks/hooks.server-8970b6b5.js:8:20)
2023-02-16 10:34:53 at async respond (file:///app/build/server/index.js:3564:22)
2023-02-16 10:34:53 at async Array.ssr (file:///app/build/handler.js:1190:3) {
2023-02-16 10:34:53 url: '',
2023-02-16 10:34:53 status: 0,
2023-02-16 10:34:53 data: {},
2023-02-16 10:34:53 isAbort: false,
2023-02-16 10:34:53 originalError: TypeError: fetch failed
2023-02-16 10:34:53 at fetch (file:///app/build/shims.js:20696:14)
2023-02-16 10:34:53 at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-02-16 10:34:53 at async GET (file:///app/build/server/chunks/_server.ts-49cdad99.js:4:20)
2023-02-16 10:34:53 at async render_endpoint (file:///app/build/server/index.js:1494:22)
2023-02-16 10:34:53 at async resolve (file:///app/build/server/index.js:3671:22)
2023-02-16 10:34:53 at async Object.handle (file:///app/build/server/chunks/hooks.server-8970b6b5.js:8:20)
2023-02-16 10:34:53 at async respond (file:///app/build/server/index.js:3564:22)
2023-02-16 10:34:53 at async Array.ssr (file:///app/build/handler.js:1190:3) {
2023-02-16 10:34:53 cause: Error: connect ECONNREFUSED 127.0.0.1:8090
2023-02-16 10:34:53 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
2023-02-16 10:34:53 errno: -111,
2023-02-16 10:34:53 code: 'ECONNREFUSED',
2023-02-16 10:34:53 syscall: 'connect',
2023-02-16 10:34:53 address: '127.0.0.1',
2023-02-16 10:34:53 port: 8090
2023-02-16 10:34:53 }
2023-02-16 10:34:53 }
2023-02-16 10:34:53 }
Okay, the problem was with docker, I had 2 images that couldn't comunicate with each other. Fixed it with depend_on in docker compose. Repo is now updated and working... It will remain public