From e946573d75ea3e7913a346ae9b964d81d2975998 Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Fri, 13 May 2016 02:00:25 +0300 Subject: [PATCH] general updates to the readme file --- README.md | 162 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index 3f346636..358beee3 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,13 @@ It's like Laravel Homestead but for Docker instead of Vagrant. - [Close all running Containers](#Close-all-running-Containers) - [Delete all existing Containers](#Delete-all-existing-Containers) - [Build/Re-build Containers](#Build-Re-build-Containers) - - [Use Redis](#Use-Redis) - [Change the PHP Version](#Change-the-PHP-Version) - [Add/Remove a Docker Container](#AddRemove-a-Docker-Container) - [Add more Software's (Docker Images)](#Add-Docker-Images) - [Edit default container configuration](#Edit-Container) - [Use custom Domain](Use-custom-Domain) - [View the Log files](#View-the-Log-files) + - [Use Redis](#Use-Redis) - [Enter a Container (SSH into a running Container)](#Enter-Container) - [Edit a Docker Image](#Edit-a-Docker-Image) - [Run a Docker Virtual Host](#Run-Docker-Virtual-Host) @@ -52,22 +52,47 @@ LaraDock strives to make the development experience easier. It contains pre-packaged Docker Images that provides you a wonderful development environment without requiring you to install PHP, NGINX, MySQL, REDIS, and any other software on your local machine. +**Usage Overview:** Run `NGINX`, `MySQL` and `Redis`. + +```shell +docker-compose up -d nginx mysql redis +``` + ### Features -- Easy switch between PHP versions: 7.0 - 5.6 - 5.5 - ... -- Choose your favorite database engine: MySQL - Postgres - Redis - ... -- Run your own combination of software's: PHP - NGINX - MySQL - ... -- Every software runs on a separate container: PHP - NGINX - ... +- Easy switch between PHP versions: 7.0 - 5.6 - 5.5 ... +- Choose your favorite database engine: MySQL - Postgres - Redis ... +- Run your own combination of software's: Memcached - MariaDB ... +- Every software runs on a separate container: PHP - NGINX ... - Easy to customize any container, with simple edit to the `dockerfile`. - All Images extends from an official base Image. (Trusted base Images). -- Pre-configured Nginx for Laravel. And very easy to update. -- Using of a Data container, to keep the Data safe and accessible at anytime. +- Pre-configured Nginx for Laravel. +- Data container, to keep Data safe and accessible. - Easy to apply configurations inside containers. - Clean and well structured Dockerfiles (`dockerfile`). - Latest version of the Docker Compose file (`docker-compose`). - Everything is visible and editable. -- Best practices everywhere. + + + +## Supported Containers + +- PHP (7.0 - 5.6 - 5.5) +- NGINX +- MySQL +- PostgreSQL +- MariaDB +- Redis +- Memcached +- Beanstalkd +- Beanstalkd Console +- Data Volume + +>Cannot find your container! we would love to have it as well. Consider contributing your container and adding it to this list. + + + @@ -105,22 +130,6 @@ LaraDock and [Homestead](https://laravel.com/docs/master/homestead) both gives y Running a virtual Container is much faster than running a full virtual Machine.
Thus **LaraDock is much faster than Homestead**. - -## Supported Containers - -- PHP (7.0 - 5.6 - 5.5) -- NGINX -- MySQL -- PostgreSQL -- MariaDB -- Redis -- Memcached -- Beanstalkd -- Beanstalkd Console -- Data Volume - -Cannot find your container! we would love to have it as well. Consider contributing your container and adding it to this list. - @@ -176,21 +185,21 @@ DB_HOST=xxx.xxx.xxx.xxx
*Make sure you are in the `docker` folder before running the `docker-compose` command.* -> Running PHP, NGINX and MySQL: +> Running PHP, NGINX, MySQL and Redis: ```bash -docker-compose up -d php nginx mysql redis +docker-compose up -d php nginx mysql redis ``` Note: you can choose your own combination of software's (containers), another example: -> Running PHP, NGINX, Postgres and Redis: +> Running PHP, NGINX, Postgres and Memcached: ```bash -docker-compose up -d php nginx beanstalkd postgres +docker-compose up -d php nginx postgres memcached ``` -Supported Containers: `nginx`, `mysql`, `redis`, `postgres`, `mariadb`, `Memcached`, `beanstalkd`, `beanstalkd-console`, `data`, `php`. +Supported Containers: `nginx`, `mysql`, `redis`, `postgres`, `mariadb`, `memcached`, `beanstalkd`, `beanstalkd-console`, `data`, `php`.
3 - Open your browser and visit your `{Docker-IP}` address (`http://xxx.xxx.xxx.xxx`). @@ -264,50 +273,6 @@ docker-compose build {container-name} ``` -
- -#### Use Redis - -1 - First make sure you run the Redis Container with the `docker-compose` command. - -2 - Open your Laravel's `.env` file and set the `REDIS_HOST` to your `Docker-IP` instead of the default `127.0.0.1` IP. - -```env -REDIS_HOST=xxx.xxx.xxx.xxx -``` - -If you don't find the `REDIS_HOST` variable in your `.env` file. Go to the database config file `config/database.php` and replace the default `127.0.0.1` IP with your `Docker-IP` for Redis like this: - -```php -'redis' => [ - 'cluster' => false, - 'default' => [ - 'host' => 'xxx.xxx.xxx.xxx', - 'port' => 6379, - 'database' => 0, - ], -], -``` - -3 - To enable Redis Caching and/or for Sessions Management. Also from the `.env` file set `CACHE_DRIVER` and `SESSION_DRIVER` to `redis` instead of the default `file`. - -```env -CACHE_DRIVER=redis -SESSION_DRIVER=redis -``` - -4 - Finally make sure you have the `predis/predis` package `(~1.0)` installed via Composer first. - -```bash -composer require predis/predis:^1.0 -``` - -5 - You can manually test it from Laravel with this code: - -```php -\Cache::store('redis')->put('LaraDock', 'Awesome', 10); -``` -
@@ -340,6 +305,8 @@ docker-compose build php ``` + +
#### Add more Software's (Docker Images) @@ -412,6 +379,55 @@ The Log files are stored in the `docker/logs` directory. + +
+ +#### Use Redis + +1 - First make sure you run the Redis Container with the `docker-compose` command. + +2 - Open your Laravel's `.env` file and set the `REDIS_HOST` to your `Docker-IP` instead of the default `127.0.0.1` IP. + +```env +REDIS_HOST=xxx.xxx.xxx.xxx +``` + +If you don't find the `REDIS_HOST` variable in your `.env` file. Go to the database config file `config/database.php` and replace the default `127.0.0.1` IP with your `Docker-IP` for Redis like this: + +```php +'redis' => [ + 'cluster' => false, + 'default' => [ + 'host' => 'xxx.xxx.xxx.xxx', + 'port' => 6379, + 'database' => 0, + ], +], +``` + +3 - To enable Redis Caching and/or for Sessions Management. Also from the `.env` file set `CACHE_DRIVER` and `SESSION_DRIVER` to `redis` instead of the default `file`. + +```env +CACHE_DRIVER=redis +SESSION_DRIVER=redis +``` + +4 - Finally make sure you have the `predis/predis` package `(~1.0)` installed via Composer first. + +```bash +composer require predis/predis:^1.0 +``` + +5 - You can manually test it from Laravel with this code: + +```php +\Cache::store('redis')->put('LaraDock', 'Awesome', 10); +``` + + + + +
#### Enter a Container (SSH into a running Container)