From 07d2b4002d6b7086f960f19219753a81b918913c Mon Sep 17 00:00:00 2001 From: David Lartey Date: Sat, 12 Dec 2020 10:14:47 +0000 Subject: [PATCH 1/2] Added section for customising Sail from the .env file. Some sail configurations like port numbers, DB credentials, etc. can be updated directly from the .env file. --- sail.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sail.md b/sail.md index 82aa93ba923..0cb7fd06367 100644 --- a/sail.md +++ b/sail.md @@ -298,6 +298,8 @@ Since Sail is just Docker, you are free to customize nearly everything about it. php artisan sail:publish ``` +You can also customize the ports sail uses directly from your `.env` file. Some keys you can use includes, `APP_PORT` to change the Http port, `FORWARD_DB_PORT` to change the mysql port and `FORWARD_REDIS_PORT` to change the Redis port. You can look through the `docker-compose.yml` file for the other configuration keys available. + After running this command, the Dockerfiles and other configuration files used by Laravel Sail will be placed within a `docker` directory in your application's root directory. After customizing your Sail installation, you may rebuild your application's containers using the `build` command: ```bash From c0ed66c050ccd7a657cfeb465d68829f728cd4a3 Mon Sep 17 00:00:00 2001 From: David Lartey Date: Sat, 12 Dec 2020 10:30:27 +0000 Subject: [PATCH 2/2] Moved the .env configurations below the Docker section --- sail.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sail.md b/sail.md index 0cb7fd06367..102f35ce962 100644 --- a/sail.md +++ b/sail.md @@ -298,10 +298,29 @@ Since Sail is just Docker, you are free to customize nearly everything about it. php artisan sail:publish ``` -You can also customize the ports sail uses directly from your `.env` file. Some keys you can use includes, `APP_PORT` to change the Http port, `FORWARD_DB_PORT` to change the mysql port and `FORWARD_REDIS_PORT` to change the Redis port. You can look through the `docker-compose.yml` file for the other configuration keys available. - After running this command, the Dockerfiles and other configuration files used by Laravel Sail will be placed within a `docker` directory in your application's root directory. After customizing your Sail installation, you may rebuild your application's containers using the `build` command: ```bash sail build --no-cache ``` + + +You can also customize some configurations for Laravel Sail directly in your `.env` file. Here are some of the configuration keys you can use: + + +``` +... + +# Change the default HTTP port +APP_PORT=8080 + +# Change the default mysql port +FORWARD_DB_PORT=30661 + +# Change the default Redis port +FORWARD_REDIS_PORT=63791 + +... +``` + +You should look through the `docker-compose.yml` file for the other configuration keys available. Remember to run the `sail build --no-cache` command after you make your changes.