diff --git a/README.md b/README.md index 4a70d2a..0d3ee97 100644 --- a/README.md +++ b/README.md @@ -135,11 +135,24 @@ What's better than a quick [video](https://www.youtube.com/watch?v=3YQsHe6oF80) > To find the IP address: > > - if you are on Linux, the containers run directly on your localhost so this `127.0.0.1` will be your IP Address. -> - if you are on MAC using **boot2docker**, run this command while boot2docker is up `boot2docker ip` to get the IP Address. +> - if you are on MAC and using **boot2docker**, type `boot2docker ip` when boot2docker is up. +> - if you are on MAC and using **docker-machine**, type `docker-machine ip {VM-Name}` after starting a virtual machine. > - if you are on Windows, check the Docker documentation for how you get the VM IP Address. +8 - Additional step for `Docker-Machine` users only. *(Skip this if you are not using `Docker-Machine`)*: -8 - Finally run the containers and start coding. +a. Edit this file `docker/docker-compose.yml` + +b. Uncomment: + +```yaml + # extra_hosts: + # - "laravel.dev:xxx.xxx.xxx.xxx" +``` +c. Replace `xxx.xxx.xxx.xxx` with your the VM IP address. + + +9 - Finally run the containers and start coding. *"Note: Only the first you run this command will take up to 7 minutes (depend on your connection speed) to download the images to your local machine, Only once in life.* @@ -147,7 +160,7 @@ What's better than a quick [video](https://www.youtube.com/watch?v=3YQsHe6oF80) docker-compose up -d ``` -9 - Open your browser and visit `http://laravel.dev` +10 - Open your browser and visit `http://laravel.dev` You should see a page like this: ![](http://s29.postimg.org/8cvh7wq2f/Screen_Shot_2015_08_21_at_9_23_19_PM.png) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f63cc59..bf58c35 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -15,8 +15,9 @@ php-nginx: links: - mysql - redis - - beanstalkd privileged: true + # extra_hosts: + # - "laravel.dev:xxx.xxx.xxx.xxx" # MySQL Container #---------------------------------------- mysql: @@ -45,14 +46,6 @@ redis: restart: always privileged: true -# Beanstalkd Container #----------------------------------- -beanstalkd: - image: laradock/beanstalkd:latest - container_name: beanstalkd - ports: - - "11300:11300" - privileged: true - # Data Volume Container #---------------------------------- data: image: laradock/data:latest @@ -61,4 +54,12 @@ data: - /var/lib/mysql - /var/lib/redis +# Beanstalkd Container #----------------------------------- +# beanstalkd: +# image: laradock/beanstalkd:latest +# container_name: beanstalkd +# ports: +# - "11300:11300" +# privileged: true + #---------------------------------------------------------- diff --git a/laravel/.env.docker b/laravel/.env.docker index f4c9537..0728b2a 100644 --- a/laravel/.env.docker +++ b/laravel/.env.docker @@ -1,5 +1,6 @@ APP_ENV=local APP_DEBUG=true +APP_URL=http://laravel.dev APP_KEY=wqgyoHNBQBgPjLorn3pJNGwYlehhXfD3 CACHE_DRIVER=redis diff --git a/laravel/.env.example b/laravel/.env.example index 7c239d6..b27bbba 100644 --- a/laravel/.env.example +++ b/laravel/.env.example @@ -1,5 +1,6 @@ APP_ENV=local APP_DEBUG=true +APP_URL=http://laravel.dev APP_KEY=SomeRandomString CACHE_DRIVER=file diff --git a/laravel/app/Http/Controllers/TestingController.php b/laravel/app/Http/Controllers/TestingController.php index 3728792..247d7a3 100644 --- a/laravel/app/Http/Controllers/TestingController.php +++ b/laravel/app/Http/Controllers/TestingController.php @@ -32,10 +32,8 @@ class TestingController extends Controller // Testing Cache (Redis) Cache::pull('test'); - // Testing Queue (Beanstalkd) - $this->dispatch(new TestingQueue()); - return view('welcome'); + } catch(Exception $e) { echo $e->getMessage(); } diff --git a/laravel/app/Jobs/TestingQueue.php b/laravel/app/Jobs/TestingQueue.php deleted file mode 100644 index 7c3e796..0000000 --- a/laravel/app/Jobs/TestingQueue.php +++ /dev/null @@ -1,24 +0,0 @@ - 'http://localhost', + 'url' => env('APP_URL', 'http://localhost'), /* |--------------------------------------------------------------------------