From a8a7685a40bad8713332c6e8333c37a3e717db44 Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Sat, 21 May 2016 19:19:03 +0300 Subject: [PATCH] basic changes to the readme format --- README.md | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index cd11f72f..6242d299 100644 --- a/README.md +++ b/README.md @@ -260,12 +260,12 @@ If you have any problem, or need a special support. Feel free to contact me, mor -### Docker +### [Docker] -#### List current running Containers +### List current running Containers ```bash docker ps ``` @@ -281,7 +281,7 @@ docker-compose ps
-#### Close all running Containers +### Close all running Containers ```bash docker-compose stop ``` @@ -299,7 +299,7 @@ docker-compose stop {container-name}
-#### Delete all existing Containers +### Delete all existing Containers ```bash docker-compose down ``` @@ -314,7 +314,7 @@ docker-compose down
-#### Enter a Container (SSH into a running Container) +### Enter a Container (SSH into a running Container) 1 - first list the current running containers with `docker ps` @@ -333,7 +333,7 @@ docker exec -it {container-name} bash
-#### Edit default container configuration +### Edit default container configuration Open the `docker-compose.yml` and change anything you want. Examples: @@ -361,7 +361,7 @@ Change Redis defaut port to 1111:
-#### Edit a Docker Image +### Edit a Docker Image 1 - Find the `dockerfile` of the image you want to edit,
@@ -388,7 +388,7 @@ docker-compose build mysql
-#### Build/Re-build Containers +### Build/Re-build Containers If you do any change to any `dockerfile` make sure you run this command, for the changes to take effect: @@ -408,7 +408,7 @@ docker-compose build {container-name}
-#### Add more Software's (Docker Images) +### Add more Software's (Docker Images) To add an image (software), just edit the `docker-compose.yml` and add your container details, to do so you need to be familiar with the [docker compose file syntax](https://docs.docker.com/compose/compose-file/). @@ -422,7 +422,7 @@ To add an image (software), just edit the `docker-compose.yml` and add your cont
-#### View the Log files +### View the Log files The Nginx Log file is stored in the `logs/nginx` directory. However to view the logs of all the other containers (MySQL, PHP-FPM,...) you can run this: @@ -437,13 +437,13 @@ docker logs {container-name}
-### Laravel +### [Laravel] -## Install Laravel from a Docker Container +### Install Laravel from a Docker Container 1 - First you need to enter the Workspace Container. @@ -484,8 +484,9 @@ cd my-cool-app +
-#### Run Artisan Commands +### Run Artisan Commands You can run artisan commands and many other Terminal commands from the Workspace container. @@ -531,7 +532,7 @@ laravel new blog
-#### Use Redis +### Use Redis 1 - First make sure you run the Redis Container with the `docker-compose` command. @@ -584,7 +585,7 @@ composer require predis/predis:^1.0
-### PHP +### [PHP] @@ -592,7 +593,7 @@ composer require predis/predis:^1.0 -#### Install PHP Extensions +### Install PHP Extensions Before installing PHP extensions, you have to decide whether you need for the `FPM` or `CLI` because each lives on a different container, if you need it for both you have to edit both containers. @@ -610,7 +611,7 @@ The PHP-CLI extensions should be installed in `workspace/Dockerfile`.
-#### Change the PHP-FPM Version +### Change the PHP-FPM Version By default **PHP-FPM 7.0** is running. >The PHP-FPM is responsible of serving your application code, you don't have to change the PHP-CLI version if you are planing to run your application on different PHP-FPM version. @@ -657,7 +658,7 @@ For more details about the PHP base image, visit the [official PHP docker images
-#### Change the PHP-CLI Version +### Change the PHP-CLI Version By default **PHP-CLI 7.0** is running. >Note: it's not very essential to edit the PHP-CLI verion. The PHP-CLI is only used for the Artisan Commands & Composer. It doesn't serve your Application code, this is the PHP-FPM job. @@ -678,14 +679,14 @@ Right now you have to manually edit the `Dockerfile` or create a new one like it
-### Misc +### [Misc] -#### Run a Docker Virtual Host +### Run a Docker Virtual Host These steps are only for **Windows & MAC** users *(Linux users don't need a virtual host)*: @@ -715,7 +716,7 @@ eval $(docker-machine env)
-#### Find your Docker IP Address +### Find your Docker IP Address **On Windows & MAC:** @@ -755,7 +756,7 @@ docker0 Link encap:Ethernet HWaddr 02:42:41:2d:c4:24
-#### Use custom Domain (instead of the Docker IP) +### Use custom Domain (instead of the Docker IP) Assuming your custom domain is `laravel.dev` and your current `Docker-IP` is `xxx.xxx.xxx.xxx`.