All Questions
99 questions
-1
votes
1
answer
51
views
postgres database connected but table relations not found when running nodejs typescript api in a docker container
i wrote a basic api with typescript in nodejs which runs fine when started with the start script "node dist/index.js", but after dockerizing it, the database seems to have been connected ...
0
votes
0
answers
56
views
Sequelize in Docker Container Fails to Connect to PostgreSQL Database - ECONNREFUSED Error
I’m facing an issue where my user-service Docker container fails to connect to my PostgreSQL database container using Sequelize. I keep getting the ECONNREFUSED error, and I’ve tried multiple steps to ...
0
votes
1
answer
2k
views
Keep getting the Error: getaddrinfo ENOTFOUND postgres when I try to connect to docker container
I keep getting this error through my typeORM DataSource connection when I'm trying to connect to my dockerized postgres database.
docker-compose.yml:
node_app:
build: ./node
container_name: ...
0
votes
1
answer
96
views
Are docker compose networks available to dockerfiles at build time?
The web server I'm setting up contains a docker-compose.yml consisting of a node and postgres service. I am able to talk to the database from the node container using the postgres container's name as ...
1
vote
1
answer
383
views
PostgreSQL Error in Docker: How to Resolve? [duplicate]
I'm encountering a puzzling issue while trying to run PostgreSQL in a Docker container, and I could use some guidance. Whenever I attempt to start a PostgreSQL container, I encounter an error message ...
0
votes
1
answer
93
views
Node.js App Fails to Connect to PostgreSQL in Docker Container Due to Timing Issue?
I've following problem
I'm creating a simple app with Node.js and postgresql
Dockerfile
FROM node:18-alpine
WORKDIR /usr/src/app
COPY package*.json ./
RUN yarn install
COPY . .
EXPOSE 3000
CMD [ "...
0
votes
1
answer
1k
views
How can i execute migrations from localhost cli into a docker container
I'm working on a project using Docker and Docker Compose. Currently, I have two containers: one for the PostgreSQL server and the other for the application. I'm using TypeORM as an ORM, and I'm trying ...
0
votes
1
answer
128
views
Nodejs server when using postgres as database in docker shows error
I have nodejs for the api part. And the data is stored in the postgres database. But when I connect to the postgres, it shows the error.
(node:25) UnhandledPromiseRejectionWarning: Error: connect ...
0
votes
1
answer
109
views
How to make Postgres connect to Nodejs using docker-compose file? Getting Error: connect ECONNREFUSED 172.24.0.3:5432 [closed]
I am taking a docker course by Stephen Grider where he sets up a Fibonacci series app that stores the index in PostgreSQL database. While calculating the value using redis. The entire thing is ...
1
vote
1
answer
400
views
ERROR: Connect to Postgres on Localhost in Docker Compose
I try to use docker-compose to build an application using Node.js and PostgreSQL(on localhost), but it still shows this error.
connect ECONNREFUSED 127.0.0.1:15432 at TCPConnectWrap.afterConnect [as ...
6
votes
1
answer
4k
views
How to use Prisma to generate database tables in Docker
Goal
I'm trying to make a minimal Express app. It has a single endpoint /users that either GETs all users in a Postgres database, or POSTs a new user. I'm trying to use Prisma as an ORM and run ...
1
vote
0
answers
820
views
P1001: Can't reach database server at `localhost`:`5432` error [duplicate]
I am trying to build a docker image from my project and run it in a container,
The project is keystone6 project connecting to a postgres database, everything worked well when I normally run the ...
1
vote
1
answer
809
views
docker-compose "depends_on" doesn't work, dependency service is never built
I'm using the following docker-compose.yml file to try to build a PostgreSQL container and a dependent web app container that uses prisma to connect to a postgres server.
version: '3.9'
services:
...
1
vote
0
answers
42
views
Docker compose won't connect Node.js app to Postgres even when host is right
I am trying to dockerize a simple Node.js MVC app that uses PostgreSQL.
My docker compose file:
version: "3"
services:
postgres:
container_name: postgres
image: postgres
ports:
...
0
votes
0
answers
492
views
How do I run a PostgreSQL container using docker-compose with startup files that depends on .env values, then running node-pg-migrate?
I want the following flow.
PostgreSQL runs startup script with the values from .env file
PostgreSQL runs successfully
App runs successfully
Run migration commands. I have already created the scripts ...