i am deploying my backed in render using docker but i am getting this error

==> Cloning from https://github.com/smit4297/image-processing-system
==> Checking out commit d1cb688f2a563237b35c8d080de388fe64450a58 in branch main
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 507B done
#1 DONE 0.0s
#2 [internal] load metadata for docker.io/library/node:14
#2 ...
#3 [auth] library/node:pull render-prod/docker-mirror-repository/library/node:pull token for us-west1-docker.pkg.dev
#3 DONE 0.0s
#2 [internal] load metadata for docker.io/library/node:14
#2 DONE 6.1s
#4 [internal] load .dockerignore
#4 transferring context: 107B done
#4 DONE 0.0s
#5 [internal] load build context
#5 transferring context: 255.97kB done
#5 DONE 0.1s
#6 [1/9] FROM docker.io/library/node:14@sha256:a158d3b9b4e3fa813fa6c8c590b8f0a860e015ad4e59bbce5744d2f6fd8461aa
#6 resolve docker.io/library/node:14@sha256:a158d3b9b4e3fa813fa6c8c590b8f0a860e015ad4e59bbce5744d2f6fd8461aa 0.0s done
#6 sha256:0d27a8e861329007574c6766fba946d48e20d2c8e964e873de352603f22c4ceb 0B / 450B 0.2s
#6 sha256:0c8cc2f24a4dcb64e602e086fc9446b0a541e8acd9ad72d2e90df3ba22f158b3 0B / 2.29MB 0.2s
#6 sha256:5f32ed3c3f278edda4fc571c880b5277355a29ae8f52b52cdf865f058378a590 0B / 35.24MB 0.2s
#6 sha256:6f51ee005deac0d99898e41b8ce60ebf250ebe1a31a0b03f613aec6bbc9b83d8 0B / 4.19kB 0.2s
#6 ...
#7 https://github.com/vishnubob/wait-for-it/raw/master/wait-for-it.sh
#7 DONE 0.7s
#6 [1/9] FROM docker.io/library/node:14@sha256:a158d3b9b4e3fa813fa6c8c590b8f0a860e015ad4e59bbce5744d2f6fd8461aa
#6 sha256:0d27a8e861329007574c6766fba946d48e20d2c8e964e873de352603f22c4ceb 450B / 450B 1.0s done
#6 sha256:6f51ee005deac0d99898e41b8ce60ebf250ebe1a31a0b03f613aec6bbc9b83d8 4.19kB / 4.19kB 1.1s done
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 0B / 191.85MB 0.2s
#6 sha256:1de76e268b103d05fa8960e0f77951ff54b912b63429c34f5d6adfd09f5f9ee2 0B / 51.88MB 0.2s
#6 sha256:0c8cc2f24a4dcb64e602e086fc9446b0a541e8acd9ad72d2e90df3ba22f158b3 2.29MB / 2.29MB 3.8s done
#6 sha256:3d2201bd995cccf12851a50820de03d34a17011dcbb9ac9fdf3a50c952cbb131 0B / 10.00MB 0.3s
#6 sha256:5f32ed3c3f278edda4fc571c880b5277355a29ae8f52b52cdf865f058378a590 8.39MB / 35.24MB 4.5s
#6 sha256:1de76e268b103d05fa8960e0f77951ff54b912b63429c34f5d6adfd09f5f9ee2 8.39MB / 51.88MB 3.8s
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 25.17MB / 191.85MB 5.1s
#6 sha256:5f32ed3c3f278edda4fc571c880b5277355a29ae8f52b52cdf865f058378a590 17.56MB / 35.24MB 6.3s
#6 sha256:1de76e268b103d05fa8960e0f77951ff54b912b63429c34f5d6adfd09f5f9ee2 26.21MB / 51.88MB 5.1s
#6 sha256:5f32ed3c3f278edda4fc571c880b5277355a29ae8f52b52cdf865f058378a590 35.24MB / 35.24MB 6.4s done
#6 sha256:1de76e268b103d05fa8960e0f77951ff54b912b63429c34f5d6adfd09f5f9ee2 41.94MB / 51.88MB 5.3s
#6 sha256:b253aeafeaa7e0671bb60008df01de101a38a045ff7bc656e3b0fbfc7c05cca5 0B / 7.86MB 0.2s
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 45.09MB / 191.85MB 6.5s
#6 sha256:1de76e268b103d05fa8960e0f77951ff54b912b63429c34f5d6adfd09f5f9ee2 51.88MB / 51.88MB 6.3s done
#6 sha256:2ff1d7c41c74a25258bfa6f0b8adb0a727f84518f55f65ca845ebc747976c408 0B / 50.45MB 0.2s
#6 sha256:3d2201bd995cccf12851a50820de03d34a17011dcbb9ac9fdf3a50c952cbb131 8.39MB / 10.00MB 3.9s
#6 sha256:3d2201bd995cccf12851a50820de03d34a17011dcbb9ac9fdf3a50c952cbb131 10.00MB / 10.00MB 4.2s done
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 67.11MB / 191.85MB 7.7s
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 92.27MB / 191.85MB 9.1s
#6 sha256:b253aeafeaa7e0671bb60008df01de101a38a045ff7bc656e3b0fbfc7c05cca5 7.86MB / 7.86MB 4.6s done
#6 sha256:2ff1d7c41c74a25258bfa6f0b8adb0a727f84518f55f65ca845ebc747976c408 8.39MB / 50.45MB 3.8s
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 109.05MB / 191.85MB 10.4s
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 125.83MB / 191.85MB 11.0s
#6 sha256:2ff1d7c41c74a25258bfa6f0b8adb0a727f84518f55f65ca845ebc747976c408 33.55MB / 50.45MB 5.1s
#6 sha256:2ff1d7c41c74a25258bfa6f0b8adb0a727f84518f55f65ca845ebc747976c408 41.94MB / 50.45MB 6.2s
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 150.99MB / 191.85MB 12.8s
#6 sha256:2ff1d7c41c74a25258bfa6f0b8adb0a727f84518f55f65ca845ebc747976c408 50.45MB / 50.45MB 7.1s
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 167.77MB / 191.85MB 14.0s
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 184.55MB / 191.85MB 14.6s
#6 sha256:2ff1d7c41c74a25258bfa6f0b8adb0a727f84518f55f65ca845ebc747976c408 50.45MB / 50.45MB 8.3s done
#6 sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 191.85MB / 191.85MB 15.7s done
#6 DONE 17.0s
#6 [1/9] FROM docker.io/library/node:14@sha256:a158d3b9b4e3fa813fa6c8c590b8f0a860e015ad4e59bbce5744d2f6fd8461aa
#6 extracting sha256:2ff1d7c41c74a25258bfa6f0b8adb0a727f84518f55f65ca845ebc747976c408
#6 extracting sha256:2ff1d7c41c74a25258bfa6f0b8adb0a727f84518f55f65ca845ebc747976c408 1.8s done
#6 extracting sha256:b253aeafeaa7e0671bb60008df01de101a38a045ff7bc656e3b0fbfc7c05cca5
#6 extracting sha256:b253aeafeaa7e0671bb60008df01de101a38a045ff7bc656e3b0fbfc7c05cca5 0.8s done
#6 extracting sha256:3d2201bd995cccf12851a50820de03d34a17011dcbb9ac9fdf3a50c952cbb131
#6 extracting sha256:3d2201bd995cccf12851a50820de03d34a17011dcbb9ac9fdf3a50c952cbb131 0.3s done
#6 extracting sha256:1de76e268b103d05fa8960e0f77951ff54b912b63429c34f5d6adfd09f5f9ee2
#6 extracting sha256:1de76e268b103d05fa8960e0f77951ff54b912b63429c34f5d6adfd09f5f9ee2 2.5s done
#6 DONE 22.3s
#6 [1/9] FROM docker.io/library/node:14@sha256:a158d3b9b4e3fa813fa6c8c590b8f0a860e015ad4e59bbce5744d2f6fd8461aa
#6 extracting sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569
#6 extracting sha256:d9a8df5894511ce28a05e2925a75e8a4acbd0634c39ad734fdfba8e23d1b1569 7.6s done
#6 extracting sha256:6f51ee005deac0d99898e41b8ce60ebf250ebe1a31a0b03f613aec6bbc9b83d8 0.0s done
#6 extracting sha256:5f32ed3c3f278edda4fc571c880b5277355a29ae8f52b52cdf865f058378a590
#6 extracting sha256:5f32ed3c3f278edda4fc571c880b5277355a29ae8f52b52cdf865f058378a590 1.9s done
#6 extracting sha256:0c8cc2f24a4dcb64e602e086fc9446b0a541e8acd9ad72d2e90df3ba22f158b3
#6 extracting sha256:0c8cc2f24a4dcb64e602e086fc9446b0a541e8acd9ad72d2e90df3ba22f158b3 0.1s done
#6 extracting sha256:0d27a8e861329007574c6766fba946d48e20d2c8e964e873de352603f22c4ceb 0.0s done
#6 DONE 32.0s
#8 [2/9] WORKDIR /usr/src/app
#8 DONE 0.0s
#9 [3/9] COPY package*.json ./
#9 DONE 0.0s
#10 [4/9] RUN npm install
#10 0.409 npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@3. I'll try to do my best with it!
#10 1.847 npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
#10 2.822 npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
#10 3.109 npm WARN deprecated @types/ioredis@5.0.0: This is a stub types definition. ioredis provides its own type definitions, so you do not need this installed.
#10 3.358 npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
#10 5.414 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.
#10 11.94 
#10 11.94 > prisma@3.15.2 preinstall /usr/src/app/node_modules/prisma
#10 11.94 > node scripts/preinstall-entry.js
#10 11.94 
#10 12.14 
#10 12.14 > msgpackr-extract@3.0.3 install /usr/src/app/node_modules/msgpackr-extract
#10 12.14 > node-gyp-build-optional-packages
#10 12.14 
#10 12.26 
#10 12.26 > prisma@3.15.2 install /usr/src/app/node_modules/prisma
#10 12.26 > node scripts/install-entry.js
#10 12.26 
#10 12.32 
#10 12.32 > sharp@0.30.7 install /usr/src/app/node_modules/sharp
#10 12.32 > (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
#10 12.32 
#10 12.42 sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.12.2/libvips-8.12.2-linux-x64.tar.br
#10 13.98 sharp: Integrity check passed for linux-x64
#10 15.10 
#10 15.10 > @prisma/engines@3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e postinstall /usr/src/app/node_modules/@prisma/engines
#10 15.10 > node download/index.js
#10 15.10 
#10 16.95 
#10 16.95 > @prisma/client@3.15.2 postinstall /usr/src/app/node_modules/@prisma/client
#10 16.95 > node scripts/postinstall.js
#10 16.95 
#10 17.56 prisma:warn The postinstall script automatically ran `prisma generate` and did not find your `prisma/schema.prisma`.
#10 17.56 If you have a Prisma schema file in a custom path, you will need to run
#10 17.56 `prisma generate --schema=./path/to/your/schema.prisma` to generate Prisma Client.
#10 17.56 If you do not have a Prisma schema file yet, you can ignore this message.
#10 17.56 
#10 17.96 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @msgpackr-extract/msgpackr-extract-linux-arm@3.0.3 (node_modules/msgpackr-extract/node_modules/@msgpackr-extract/msgpackr-extract-linux-arm):
#10 17.96 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @msgpackr-extract/msgpackr-extract-linux-arm@3.0.3: wanted {"os":"linux","arch":"arm"} (current: {"os":"linux","arch":"x64"})
#10 17.96 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3 (node_modules/msgpackr-extract/node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64):
#10 17.96 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
#10 17.96 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @msgpackr-extract/msgpackr-extract-win32-x64@3.0.3 (node_modules/msgpackr-extract/node_modules/@msgpackr-extract/msgpackr-extract-win32-x64):
#10 17.96 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @msgpackr-extract/msgpackr-extract-win32-x64@3.0.3: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
#10 17.97 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3 (node_modules/msgpackr-extract/node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64):
#10 17.97 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
#10 17.97 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3 (node_modules/msgpackr-extract/node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64):
#10 17.97 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
#10 17.98 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.3.2 (node_modules/jest-haste-map/node_modules/fsevents):
#10 17.98 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
#10 17.98 npm WARN image-processing-system@1.0.0 No description
#10 17.99 npm WARN image-processing-system@1.0.0 No repository field.
#10 17.99 npm WARN image-processing-system@1.0.0 No license field.
#10 17.99 
#10 17.99 added 483 packages from 628 contributors and audited 490 packages in 17.606s
#10 18.10 
#10 18.10 60 packages are looking for funding
#10 18.10   run `npm fund` for details
#10 18.10 
#10 18.10 found 2 vulnerabilities (1 moderate, 1 high)
#10 18.10   run `npm audit fix` to fix them, or `npm audit` for details
#10 DONE 18.4s
#11 [5/9] COPY . .
#11 DONE 0.7s
#12 [6/9] RUN npm run build
#12 0.225 
#12 0.225 > image-processing-system@1.0.0 build /usr/src/app
#12 0.225 > tsc
#12 0.225 
#12 DONE 2.2s
#13 [7/9] RUN npx prisma generate
#13 0.590 Prisma schema loaded from prisma/schema.prisma
#13 1.599 
#13 1.599 ✔ Generated Prisma Client (3.15.2 | library) to ./node_modules/@prisma/client in 164ms
#13 1.599 You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
#13 1.599 ```
#13 1.599 import { PrismaClient } from '@prisma/client'
#13 1.599 const prisma = new PrismaClient()
#13 1.599 ```
#13 DONE 1.7s
#14 [8/9] ADD https://github.com/vishnubob/wait-for-it/raw/master/wait-for-it.sh /usr/wait-for-it.sh
#14 DONE 0.1s
#15 [9/9] RUN chmod +x /usr/wait-for-it.sh
#15 DONE 0.1s
#16 exporting to docker image format
#16 exporting layers
#16 exporting layers 15.9s done
#16 exporting manifest sha256:90d60727c007071da9c97524170e1f594ca4c565950d8753ac2b91a8d941b4f8 0.0s done
#16 exporting config sha256:2fec9a6dc62088504cc2beb0cc89f59c78f36cbc6ac751e536237bd5d86ae2cd 0.0s done
#16 DONE 22.2s
#17 exporting cache to client directory
#17 preparing build cache for export
#17 writing cache manifest sha256:da003feb3fe9f849df93ac186a84c756fe85354048f98d107189cc8c107197ef
#17 writing cache manifest sha256:da003feb3fe9f849df93ac186a84c756fe85354048f98d107189cc8c107197ef done
#17 DONE 8.2s
Upload succeeded
DONE
==> Deploying...
wait-for-it.sh: waiting 15 seconds for db:5432
wait-for-it.sh: timeout occurred after waiting 15 seconds for db:5432
> image-processing-system@1.0.0 migrate /usr/src/app
> prisma migrate deploy
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "imageprocessing", schema "public" at "db:5432"
Error: P1001: Can't reach database server at `db`:`5432`
Please make sure your database server is running at `db`:`5432`.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! image-processing-system@1.0.0 migrate: `prisma migrate deploy`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the image-processing-system@1.0.0 migrate script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2024-10-10T15_12_31_416Z-debug.log
wait-for-it.sh: waiting 15 seconds for db:5432
==> Exited with status 1

im my local pc when i am running docker compose up --build it is working fine

deployment not working

FROM node:14

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build

# Generate Prisma client
RUN npx prisma generate

EXPOSE 3000

# Add wait-for-it script
ADD https://github.com/vishnubob/wait-for-it/raw/master/wait-for-it.sh /usr/wait-for-it.sh
RUN chmod +x /usr/wait-for-it.sh

# Use wait-for-it to ensure DB is ready before running migrations and starting the app
CMD /usr/wait-for-it.sh db:5432 -- npm run migrate && npm start

version: '3.8'
services:
  app:
    build: .
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
      - DATABASE_URL=postgresql://user:password@db:5432/imageprocessing
      - REDIS_URL=redis://redis:6379
      - WEBHOOK_URL=http://example.com/webhook
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_started
    networks:
      - app-network
  db:
    image: postgres:13
    environment:
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=imageprocessing
    volumes:
      - postgres_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U user -d imageprocessing" ]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - app-network
  redis:
    image: redis:6
    networks:
      - app-network
volumes:
  postgres_data:
networks:
  app-network:
    driver: bridge