Next, set the APP_PORT to something custom in each Laravel APP. Īnd you can keep each Apps DB_HOST to 3306 If you are working on multiple Laravel projects at once, set each App's FORWARD_DB_PORT differently, ie: 3307,3308,3309. The Container however, uses the DB_PORT setting to connect to the db. Ie: if you set it to 3309 like I did, this is what you will put in your PHPStorm settings to access the DB. FORWARD_DB_PORT is what YOU will use to connect to your db while developing. Understanding the difference between FORWARD_DB_PORT, and DB_PORT is important. ![]() Please note, THIS is the name you need to use for DB_HOST If you open the docker-compose.yml, which Sail installs, you will notice that they have named the mysql container 'mysql' (its under services). Hopefully this post will help if you experience the same difficulties.įrom Laravel's documentation, installing Sail is easy:īefore you running the next step however, you need to pay special attention to the a few. While setting up sail, I had a difficult time getting PHPUnit working. Once it works it works great! But there were a few extra steps needed to get it running on my dev setup. ![]() Laravel Sail is an interface that is supposed to be an easy way to get started with using Docker and Laravel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |