Level 10
Found the solution. You don't need to set the DB_HOST to the container's IP addres and the same for MAIL_HOST.
All you need to do is set them to the service names provides in the docker-compose.yml file:
DB_HOST=mysql
MAIL_HOST=mailhog
Summer Sale! All accounts are 50% off this week.
Hi, I have got Laravel Sail working but for some reason I have to change the DB_HOST to use the containers IP address and I have to do the same for MAIL_HOST to get mail sending.
Does anybody know how I can get round this and just use the default settings in the .env file?
Found the solution. You don't need to set the DB_HOST to the container's IP addres and the same for MAIL_HOST.
All you need to do is set them to the service names provides in the docker-compose.yml file:
DB_HOST=mysql
MAIL_HOST=mailhog
Please or to participate in this conversation.