docker-compose.yml
version: "3.8"
services:
database:
image: postgres
container_name: database-ignite
restart: always
ports:
- 5432:5432
environment:
- POSTGRES_USER=SYSDBA
- POSTGRES_PASSWORD=masterkey
- POSTGRES_DB=rentx
volumes:
- pgdata:/data/postgres
app:
build: .
container_name: rentx
ports:
- 3333:3333
volumes:
- .:/usr/app
depends_on:
- database
volumes:
pgdata:
driver: local
error:
when I run ādocker logs rentx -fā it returns this error
rentalx@1.0.0 start
ts-node-dev --inspect --transpile-only --ignore-watch node_modules --respawn src/server.ts
[INFO] 14:53:59 ts-node-dev ver. 2.0.0 (using ts-node ver. 10.8.1, typescript ver. 4.7.3)
Debugger listening on ws://127.0.0.1:9229/a142edaa-8170-49f8-a9a6-ad9bc74bb543
For help, see: Debugging - Getting Started | Node.js
database is running!
Server is running!
Error: connect ECONNREFUSED 127.0.0.1:5432
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1237:16)
[ERROR] 14:54:24 Error: connect ECONNREFUSED 127.0.0.1:5432
How I can fix it ?