Customizing Laravel Sail
[00:00] To customize Sail, first you need to make sure it's up and running. So do sail up -d
and then you need to publish all of its configuration files. You can do that by running the following command: sail artisan sail:publish
. This will publish the configuration files for both the PHP 7 version and the PHP 8 one.
[00:30] You can then go to docker, 8.0, open the Dockerfile
and make whatever changes you want to it.
[00:39] Let's say we need to use ffmpeg, which is a command line program used to process video and audio files. I can go right here after apt-get install -y
and say ffmpeg
and save. Next we need to go back to the terminal and stop sail using sail down
and rebuild the images using the new configuration file. And we can do that with sail build --no-cache
. And to test our ffmpeg installation we open a new shell using sail shell
and run ffmpeg
, and here it is.
-
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
-
6Run Sail and Valet in parallel01:39
-
Customizing 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
-
6Run Sail and Valet in parallel01:39
-
Customizing Laravel Sail01:25
-
8Setup Laravel Sail for an existing Laravel application00:49