Docker-compose: App container can't connect to Postgres Docker-compose: App container can't connect to Postgres flask flask

Docker-compose: App container can't connect to Postgres


Your host in the settings.py file should be "db". compose exposes hosts on an internal network with the same host names as your services.

POSTGRES = {    'user': "ubuntu",    'pw': "pickles",    'db': "db",    'host': "db",    'port': '5432',}