strapi / strapi-docker

Install and run your first Strapi project using Docker
https://strapi.io
MIT License
1.17k stars 445 forks source link

Error getaddrinfo EAI_AGAIN postgres, when creating my own dockerfile #278

Closed RaimonxDev closed 3 years ago

RaimonxDev commented 3 years ago

Hi everyone, I have my application and I used the following example for Dockerfile.

image

then I try to build the image with Postgres databases and it gives me the following error

image

here my docker-compose.

image

Where am I making the mistake? it is an app already built locally, I appreciate any help or guidance

alexandrebodin commented 3 years ago

Hi, how do you define your DATABASE_HOST ? is it postgres2 (name of service) on your network ?

RaimonxDev commented 3 years ago

Hi, how do you define your DATABASE_HOST ? is it postgres2 (name of service) on your network ?

OMG, of course. The value of .env had not changed .. Thank you very much. everything is resolved

e1sep0 commented 3 months ago

Hi, but if i change .env variable, will can`t connect to DB in docker. How to resolve it ?