Run Sail and Valet in parallel
[00:00] The first thing I'm going to do is to shut down sail. Then I will restart laravel valet, and also mysql using brew services start mysql
. Now if I open my browser and go to wordpress.test, here I have a wordpress installation running on Laravel Valet.
[00:34] Now back to the terminal, if I try to start Sail, it will fail because the mysql and http ports are no longer available. However, we can instruct Sail to use different ports. If I open the docker-compose.yml
file, we see we have these environment variables. We have the APP_PORT
and the FORWARD_DB_PORT
. We can set these when we start Sail like so: we can do APP_PORT=81
and we can do FORWARD_DB_PORT=3307
and then sail up -d
(APP_PORT=81 FORWARD_DB_PORT=3307 sail up -d
).
[01:26] And now Sail should be working with valet in parallel. The difference is, instead of accessing localhost, we'll have to specify the port, which is 81.
-
1Setup a new project using Laravel Sail (macOS)02:33
-
2Executing commands inside your application containers02:20
-
3Creating a database client connection01:30
-
4Testing emails with Mailhog02:35
-
5Changing the php version in Laravel Sail01:29
-
Run Sail and Valet in parallel01:39
-
7Customizing Laravel Sail01:25
-
8Setup Laravel Sail for an existing Laravel application00:49
-
1Setup a new project using Laravel Sail (macOS)02:33
-
2Executing commands inside your application containers02:20
-
3Creating a database client connection01:30
-
4Testing emails with Mailhog02:35
-
5Changing the php version in Laravel Sail01:29
-
Run Sail and Valet in parallel01:39
-
7Customizing Laravel Sail01:25
-
8Setup Laravel Sail for an existing Laravel application00:49