We are using postgre as a service in a docker-compose file.
The docker-compose file is the following:
and the travis file is the following:
As you can see, we are using the wait-for-it.sh script to wait for postgree to be up before performing tests.
Until recently, this method was functionning but starting from the recent days, we are getting the following error:
File "/usr/local/lib/python3.6/dist-packages/psycopg2/__init__.py", line 130, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError: could not translate host name "db" to address: Name or service not known The command "docker-compose -f docker-compose-prod.yml run --service-ports --rm web ./wait-for-it.sh db:5432 -- python3 manage.py test" exited with 1.
Any suggestions on what could be causing this issue ? Any change in Travis CI we should be aware of ?