Senior App Dev @ Acuity Brands Lighting | Co-Founder of https://ct3dao.io | President of https://NewHaven.IO | Maintainer of https://TechEnthusiastScholarship.com | https://HenryGives.Coffee
Location
New Haven, CT
Education
Computer Network & Information Security @ Champlain College
I'd consider updating your docker-compose.yaml to version 3.x and use the container_name item to force a name on your container.
Then, in your ENV file, use whatever you set that container_name to DB_HOST. I understand why you're trying to use localhost, but if all of these containers are on one Docker network, they'll want to refer to each other by their container names.
Senior App Dev @ Acuity Brands Lighting | Co-Founder of https://ct3dao.io | President of https://NewHaven.IO | Maintainer of https://TechEnthusiastScholarship.com | https://HenryGives.Coffee
Location
New Haven, CT
Education
Computer Network & Information Security @ Champlain College
I'd consider updating your docker-compose.yaml to version 3.x and use the container_name item to force a name on your container.
Then, in your ENV file, use whatever you set that container_name to DB_HOST. I understand why you're trying to use localhost, but if all of these containers are on one Docker network, they'll want to refer to each other by their container names.
I feel like i need to have a better understanding of docker.
Definitely will try doing that and will update you.
We all start somewhere, my dude. :)