@@ -25,11 +25,11 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
2525 - [Delete all existing Containers](#Delete-all-existing-Containers)
2626 - [Build/Re-build Containers](#Build-Re-build-Containers)
2727 - [Use Redis](#Use-Redis)
28- - [Use custom Domain](Use-custom-Domain)
2928 - [Change the PHP Version](#Change-the-PHP-Version)
3029 - [Add/Remove a Docker Container](#AddRemove-a-Docker-Container)
3130 - [Add more Software's (Docker Images)](#Add-Docker-Images)
32- - [Edit a Docker Container](#Edit-a-Docker-Container)
31+ - [Edit default container configuration](#Edit-Container)
32+ - [Use custom Domain](Use-custom-Domain)
3333 - [View the Log files](#View-the-Log-files)
3434 - [Enter a Container (SSH into a running Container)](#Enter-Container)
3535 - [Edit a Docker Image](#Edit-a-Docker-Image)
@@ -245,39 +245,7 @@ composer require predis/predis:^1.0
2452455 - You can manually test it from Laravel with this code:
246246
247247``` php
248- \Cache::store('redis')->put('laradock', 'awesome', 10);
249- ```
250-
251-
252-
253- <br >
254- <a name =" Use-custom-Domain " ></a >
255- #### Use custom Domain (instead of the Docker IP)
256-
257- Assuming your custom domain is ` laravel.dev ` and your current ` Docker-IP ` is ` xxx.xxx.xxx.xxx ` .
258-
259- 1 - Open your ` /etc/hosts ` file and map your ` Docker IP ` to the ` laravel.dev ` domain, by adding the following:
260-
261- ``` bash
262- xxx.xxx.xxx.xxx laravel.dev
263- ```
264-
265- 2 - Open your Laravel's ` .env ` file and replace the ` 127.0.0.1 ` default values with your ` {Docker-IP} ` .
266- <br >
267- Example:
268-
269- ``` env
270- DB_HOST=xxx.xxx.xxx.xxx
271- ```
272-
273- 3 - Open your browser and visit ` {http://laravel.dev} `
274-
275-
276-
277- Optionally you can define the server name in the nginx config file, like this:
278-
279- ```
280- server_name laravel.dev;
248+ \Cache::store('redis')->put('LaraDock', 'Awesome', 10);
281249```
282250
283251
@@ -306,6 +274,8 @@ Supported Versions:
306274For more details visit the [ official PHP docker images] ( https://hub.docker.com/_/php/ ) .
307275
308276
277+
278+
309279<br >
310280<a name =" Add-Docker-Images " ></a >
311281#### Add more Software's (Docker Images)
@@ -315,19 +285,61 @@ To add an image (software), just edit the `docker-compose.yml` and add your cont
315285
316286
317287<br >
318- <a name =" Edit-a-Docker-Container " ></a >
319- #### Edit a Docker Container (change Ports or Volumes)
320- To modify a container you can simply open the ` docker-compose.yml ` and change everything you want.
288+ <a name =" Edit-Container " ></a >
289+ #### Edit default container configuration
290+ Open the ` docker-compose.yml ` and change anything you want.
291+
292+ Examples:
321293
322- Example: if you want to set the MySQL port to 3333, just replace the default port with yours:
294+ Change MySQL Database Name:
295+
296+ ``` yml
297+ environment :
298+ MYSQL_DATABASE : laradock
299+ ` ` `
300+
301+ Change Redis defaut port to 1111:
323302
324303` ` ` yml
325304 ports :
326- - " 3333:3306 "
305+ - " 1111:6379 "
327306` ` `
328307
329308
330309
310+ <br>
311+ <a name="Use-custom-Domain"></a>
312+ #### Use custom Domain (instead of the Docker IP)
313+
314+ Assuming your custom domain is ` laravel.dev` and your current `Docker-IP` is `xxx.xxx.xxx.xxx`.
315+
316+ 1 - Open your `/etc/hosts` file and map your `Docker IP` to the `laravel.dev` domain, by adding the following :
317+
318+ ` ` ` bash
319+ xxx.xxx.xxx.xxx laravel.dev
320+ ` ` `
321+
322+ 2 - Open your Laravel's `.env` file and replace the `127.0.0.1` default values with your `{Docker-IP}`.
323+ <br>
324+ Example :
325+
326+ ` ` ` env
327+ DB_HOST=xxx.xxx.xxx.xxx
328+ ` ` `
329+
330+ 3 - Open your browser and visit `{http://laravel.dev}`
331+
332+
333+
334+ Optionally you can define the server name in the nginx config file, like this :
335+
336+ ` ` `
337+ server_name laravel.dev;
338+ ` ` `
339+
340+
341+
342+
331343<br>
332344<a name="View-the-Log-files"></a>
333345# ### View the Log files
0 commit comments