Is this a new or existing setup?
You can run docker-compose ps and confirm the database is running.
docker-compose ps