Alla fine ce l'ho fatta: specificare esplicitamente host e porta nel file di settings del mio progetto Django ha risolto il problema!
DATABASES = { 'default': { 'ENGINE' : 'django.db.backends.postgresql_psycopg2', 'NAME' : 'project_ci_test', 'USER' : 'postgres', 'PASSWORD': '', 'HOST' : 'postgres' 'PORT' : '5432' } }