change HOST
to:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD': 'password',
'HOST': 'db',
'PORT': '5432',
}
}
0.0.0.0
is not a valid IP
, beside you need to connect using the service
name since compose
will resolve it for you