diff --git a/.gitignore b/.gitignore index b700e0e..4d0d340 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ Homestead.json Homestead.yaml .env +/aliases +/after.sh \ No newline at end of file diff --git a/Homestead.yaml.example b/Homestead.yaml.example new file mode 100644 index 0000000..df436f5 --- /dev/null +++ b/Homestead.yaml.example @@ -0,0 +1,15 @@ +ip: 192.168.10.30 +memory: 2048 +cpus: 1 +provider: virtualbox +authorize: ~/.ssh/id_rsa.pub +keys: + - ~/.ssh/id_rsa +folders: + - { map: ~/Sites/pastebin, to: /home/vagrant/Code/pastebin } +sites: + - { map: pastebin.app, to: /home/vagrant/Code/pastebin/public } +databases: + - homestead +name: pastebin +hostname: pastebin \ No newline at end of file diff --git a/composer.json b/composer.json index d86763e..aea07ac 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "require-dev": { "codeclimate/php-test-reporter": "^0.4.4", "fzaninotto/faker": "^1.6", - "laravel/homestead": "^5.0", + "laravel/homestead": "^5", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~5.7" }, @@ -41,6 +41,7 @@ "php artisan key:generate" ], "post-install-cmd": [ + "php -r \"file_exists('.env') || copy('.env.example', '.env');\"", "Illuminate\\Foundation\\ComposerScripts::postInstall", "php artisan optimize" ], diff --git a/composer.lock b/composer.lock index 9ce7991..0aad78e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "49fcc7d296ccc2806c156fc229ad041e", + "content-hash": "10c4967a5c4ad04c407e38d18c26d43d", "packages": [ { "name": "bugsnag/bugsnag", @@ -2868,16 +2868,16 @@ }, { "name": "laravel/homestead", - "version": "v5.0.1", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/laravel/homestead.git", - "reference": "af6ba5202e8c3e1f377fd748cbe7a7d8c1ba4d22" + "reference": "f54a9f0b6a0de85c96d5e82fd94a563d979f8288" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/homestead/zipball/af6ba5202e8c3e1f377fd748cbe7a7d8c1ba4d22", - "reference": "af6ba5202e8c3e1f377fd748cbe7a7d8c1ba4d22", + "url": "https://api.github.com/repos/laravel/homestead/zipball/f54a9f0b6a0de85c96d5e82fd94a563d979f8288", + "reference": "f54a9f0b6a0de85c96d5e82fd94a563d979f8288", "shasum": "" }, "require": { @@ -2914,7 +2914,7 @@ } ], "description": "A virtual machine for web artisans.", - "time": "2017-02-28T13:26:35+00:00" + "time": "2017-06-09T13:53:37+00:00" }, { "name": "mockery/mockery", diff --git a/readme.md b/readme.md index 644bb5c..d8051a2 100644 --- a/readme.md +++ b/readme.md @@ -28,34 +28,17 @@ Please make sure you install the following tools before starting with the instal ## Installation -> Note that you're free to adjust the `~/Sites/pastebin` location to any directory you want on your machine. +> Note that you're free to adjust the `~/Code/pastebin` location that will be in the `Homestead.yaml` to any directory you want on your machine. 1. Clone this repository: `git clone git@github.com:laravelio/pastebin.git pastebin` -2. Add the `Homestead.yaml` file from below to the root of your project +2. Run `./vendor/bin/homestead make --no-after` 3. Run `vagrant up` -4. SSH into your Vagrant box, go to `/home/vagrant/pastebin` and run the following commands: +4. SSH into your Vagrant box, go to `/home/vagrant/Code/pastebin` and run the following commands: 1. `composer install` - 2. `php artisan migrate` + 2. `php artisan key:generate` + 3. `php artisan migrate` 5. Add `192.168.10.30 pastebin.app` to your computer's `/etc/hosts` file -```yaml -ip: 192.168.10.30 -memory: 2048 -cpus: 1 -provider: virtualbox -authorize: ~/.ssh/id_rsa.pub -keys: - - ~/.ssh/id_rsa -folders: - - { map: ~/Sites/pastebin, to: /home/vagrant/pastebin } -sites: - - { map: pastebin.app, to: /home/vagrant/pastebin/public } -databases: - - homestead -name: pastebin -hostname: pastebin -``` - You can now visit the app in your browser by visiting [http://pastebin.app/](http://pastebin.app). ## Maintainers